Szymon Janc
83ebb9ec73
Bluetooth: Fix not registering BR/EDR SMP channel with force_bredr flag
If force_bredr is set SMP BR/EDR channel should also be for non-SC
capable controllers. Since hcidev flag is persistent wrt power toggle
it can be already set when calling smp_register(). This resulted in
SMP BR/EDR channel not being registered even if HCI_FORCE_BREDR_SMP
flag was set.
This also fix NULL pointer dereference when trying to disable
force_bredr after power cycle.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000388
IP: [<ffffffffc0493ad8>] smp_del_chan+0x18/0x80 [bluetooth]
Call Trace:
[<ffffffffc04950ca>] force_bredr_smp_write+0xba/0x100 [bluetooth]
[<ffffffff8133be14>] full_proxy_write+0x54/0x90
[<ffffffff81245967>] __vfs_write+0x37/0x160
[<ffffffff813617f7>] ? selinux_file_permission+0xd7/0x110
[<ffffffff81356fbd>] ? security_file_permission+0x3d/0xc0
[<ffffffff810eb5b2>] ? percpu_down_read+0x12/0x50
[<ffffffff812462a5>] vfs_write+0xb5/0x1a0
[<ffffffff812476f5>] SyS_write+0x55/0xc0
[<ffffffff817eb872>] entry_SYSCALL_64_fastpath+0x1a/0xa4
Code: 48 8b 45 f0 eb c1 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f
44 00 00 f6 05 c6 3b 02 00 04 55 48 89 e5 41 54 53 49 89 fc 75
4b
<49> 8b 9c 24 88 03 00 00 48 85 db 74 31 49 c7 84 24 88 03 00 00
RIP [<ffffffffc0493ad8>] smp_del_chan+0x18/0x80 [bluetooth]
RSP <ffff8802aee3bd90>
CR2: 0000000000000388
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2016-09-19 20:19:34 +02:00
..
2016-09-19 20:19:34 +02:00
2016-08-09 13:42:36 +03:00
2016-08-13 15:15:54 -07:00
2016-09-10 21:19:10 -07:00
2016-09-10 21:19:10 -07:00
2016-06-18 20:55:34 -07:00
2016-09-01 14:09:00 -07:00
2016-09-19 20:19:34 +02:00
2016-09-13 11:21:31 -04:00
2016-06-28 05:26:14 -04:00
2016-06-23 11:23:49 +02:00
2016-08-08 21:41:42 +02:00
2016-09-18 22:33:42 -04:00
2016-07-29 17:38:46 -07:00
2016-07-05 14:08:47 -07:00
2016-04-11 22:37:37 +01:00
2016-09-16 04:31:51 -04:00
2016-02-24 13:58:05 -05:00
2016-05-16 14:00:43 -04:00
2016-07-08 13:23:12 +02:00
2016-09-17 10:13:07 -04:00
2016-09-19 01:25:22 -04:00
2016-08-19 18:07:24 -07:00
2016-07-29 17:38:46 -07:00
2016-09-12 15:52:44 -07:00
2016-09-17 10:07:23 -04:00
2016-09-10 23:12:53 -07:00
2016-05-29 22:33:25 -07:00
2016-09-17 10:05:05 -04:00
2016-09-18 22:29:08 -04:00
2016-09-19 20:19:34 +02:00
2016-09-01 10:13:15 -07:00
2016-07-25 10:32:59 -07:00
2016-09-19 01:25:22 -04:00
2016-06-27 15:06:18 -04:00
2016-09-07 17:29:38 -07:00
2016-07-11 02:02:03 +02:00
2016-09-18 22:14:01 -04:00
2016-07-24 00:53:32 -04:00
2016-02-11 03:54:14 -05:00
2016-05-17 14:11:19 -04:00
2016-08-08 16:16:21 -07:00
2016-04-05 10:48:53 +02:00
2016-07-13 11:53:40 -07:00
2016-09-17 11:24:04 +01:00
2016-09-19 01:47:18 -04:00
2016-09-19 01:34:01 -04:00
2016-08-28 23:32:41 -04:00
2016-08-24 22:32:55 -04:00
2016-09-01 16:56:15 -07:00
2016-09-13 11:28:32 -04:00
2016-09-04 13:29:29 -07:00
2016-08-15 05:05:21 +03:00
2016-09-18 22:29:08 -04:00
2016-09-09 18:13:30 -07:00
2016-09-12 15:52:44 -07:00
2016-06-09 23:41:03 -07:00
2016-08-17 19:36:23 -04:00
2016-08-17 19:36:23 -04:00
2016-05-19 19:12:14 -07:00
2016-08-14 21:08:58 -07:00