Wang Hai
2a7ca7459d
Bluetooth: cmtp: fix possible panic when cmtp_init_sockets() fails
...
I got a kernel BUG report when doing fault injection test:
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:45!
...
RIP: 0010:__list_del_entry_valid.cold+0x12/0x4d
...
Call Trace:
proto_unregister+0x83/0x220
cmtp_cleanup_sockets+0x37/0x40 [cmtp]
cmtp_exit+0xe/0x1f [cmtp]
do_syscall_64+0x35/0xb0
entry_SYSCALL_64_after_hwframe+0x44/0xae
If cmtp_init_sockets() in cmtp_init() fails, cmtp_init() still returns
success. This will cause a kernel bug when accessing uncreated ctmp
related data when the module exits.
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Wang Hai <wanghai38@huawei.com >
Signed-off-by: Marcel Holtmann <marcel@holtmann.org >
2021-10-25 15:02:04 +02:00
..
2021-07-22 16:19:03 +02:00
2021-09-05 08:36:44 +09:00
2021-08-13 16:30:35 -07:00
2021-10-02 14:18:25 +01:00
2021-07-23 14:20:25 +01:00
2021-06-10 14:08:09 -07:00
2021-08-03 11:21:39 +01:00
2021-09-03 15:33:47 -07:00
2021-10-25 15:02:04 +02:00
2021-10-01 19:58:02 -07:00
2021-06-25 13:13:50 +02:00
2021-10-02 14:18:25 +01:00
2021-09-14 12:51:15 +01:00
2021-08-05 13:27:50 +01:00
2021-06-30 15:51:09 -07:00
2021-10-02 14:08:14 +01:00
2021-06-01 17:01:33 -07:00
2021-09-08 11:28:35 +01:00
2021-08-05 13:27:50 +01:00
2021-01-27 17:04:12 -08:00
2021-10-02 14:18:25 +01:00
2021-10-02 14:18:25 +01:00
2021-09-29 11:32:14 +01:00
2021-10-02 14:18:25 +01:00
2021-08-13 06:41:22 -07:00
2021-01-27 17:04:12 -08:00
2021-09-30 14:49:21 -07:00
2021-10-04 13:40:19 +01:00
2021-08-09 10:13:32 +01:00
2021-06-29 11:28:21 -07:00
2021-05-26 07:03:39 +02:00
2021-09-09 11:00:20 +01:00
2021-03-28 17:56:55 -07:00
2021-06-08 16:31:25 -07:00
2021-08-05 13:27:50 +01:00
2021-09-28 12:59:24 +01:00
2021-09-07 14:06:08 +01:00
2021-10-03 14:35:41 +01:00
2021-07-23 17:17:56 +01:00
2021-09-30 14:49:21 -07:00
2021-09-01 17:18:56 -07:00
2021-09-21 03:46:56 +02:00
2021-08-30 12:23:18 +01:00
2021-10-05 13:07:03 +01:00
2021-08-05 13:27:50 +01:00
2021-09-13 14:38:00 +01:00
2021-08-19 18:09:18 -07:00
2021-09-10 10:00:59 +01:00
2021-08-05 13:27:50 +01:00
2021-03-14 15:00:43 -07:00
2021-09-28 17:36:43 -07:00
2021-08-18 15:35:50 -07:00
2021-04-20 16:44:04 -07:00
2021-03-10 12:45:15 -08:00
2021-09-24 14:18:34 +01:00
2021-09-30 17:27:03 -07:00
2021-09-24 10:36:19 +01:00
2021-09-23 11:19:49 -07:00
2021-06-29 11:28:21 -07:00
2021-09-08 15:55:42 -07:00
2021-08-04 12:35:07 +01:00
2021-09-13 12:43:10 +01:00
2021-09-28 13:26:23 +01:00
2021-09-30 14:18:40 +01:00
2021-09-06 02:25:16 -04:00
2021-08-26 11:04:55 +02:00
2021-06-10 14:08:09 -07:00
2021-09-29 13:59:13 +02:00
2021-08-27 11:16:29 +01:00
2021-06-03 15:13:56 -07:00
2021-06-11 12:55:28 -07:00
2021-10-01 15:45:10 -07:00
2021-07-29 15:06:49 +01:00
2021-08-31 16:43:06 -07:00
2021-04-12 13:27:11 -07:00