OrangePi_CM5/drivers/bluetooth
Tetsuo Handa d7cc0d51ff Bluetooth: hci_{ldisc,serdev}: check percpu_init_rwsem() failure
[ Upstream commit 3124d320c22f3f4388d9ac5c8f37eaad0cefd6b1 ]

syzbot is reporting NULL pointer dereference at hci_uart_tty_close() [1],
for rcu_sync_enter() is called without rcu_sync_init() due to
hci_uart_tty_open() ignoring percpu_init_rwsem() failure.

While we are at it, fix that hci_uart_register_device() ignores
percpu_init_rwsem() failure and hci_uart_unregister_device() does not
call percpu_free_rwsem().

Link: https://syzkaller.appspot.com/bug?extid=576dfca25381fb6fbc5f [1]
Reported-by: syzbot <syzbot+576dfca25381fb6fbc5f@syzkaller.appspotmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fixes: 67d2f8781b ("Bluetooth: hci_ldisc: Allow sleeping while proto locks are held.")
Fixes: d73e172816 ("Bluetooth: hci_serdev: Init hci_uart proto_lock to avoid oops")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 13:25:21 +02:00
..
Kconfig
…
Makefile
…
ath3k.c
…
bcm203x.c
…
bfusb.c Bluetooth: bfusb: fix division by zero in send path 2022-01-16 09:14:22 +01:00
bluecard_cs.c
…
bpa10x.c
…
bt3c_cs.c
…
btbcm.c Bluetooth: hci_bcm: Add BCM4349B1 variant 2022-08-11 13:06:45 +02:00
btbcm.h
…
btintel.c
…
btintel.h
…
btmrvl_debugfs.c
…
btmrvl_drv.h
…
btmrvl_main.c
…
btmrvl_sdio.c
…
btmrvl_sdio.h
…
btmtksdio.c Bluetooth: btmtksdio: Fix kernel oops in btmtksdio_interrupt 2022-04-08 14:40:22 +02:00
btmtkuart.c Bluetooth: btmtkuart: fix a memleak in mtk_hci_wmt_sync 2021-11-18 14:04:03 +01:00
btqca.c
…
btqca.h
…
btqcomsmd.c
…
btrsi.c
…
btrtl.c
…
btrtl.h
…
btsdio.c
…
btusb.c Bluetooth: btusb: mediatek: fix WMT failure during runtime suspend 2022-10-26 13:25:19 +02:00
dtl1_cs.c
…
h4_recv.h
…
hci_ag6xx.c
…
hci_ath.c
…
hci_bcm.c Bluetooth: hci_bcm: Add DT compatible for CYW55572 2022-08-11 13:06:46 +02:00
hci_bcsp.c
…
hci_h4.c
…
hci_h5.c
…
hci_intel.c Bluetooth: hci_intel: Add check for platform_driver_register 2022-08-21 15:15:49 +02:00
hci_ldisc.c Bluetooth: hci_{ldisc,serdev}: check percpu_init_rwsem() failure 2022-10-26 13:25:21 +02:00
hci_ll.c
…
hci_mrvl.c
…
hci_nokia.c
…
hci_qca.c Bluetooth: hci_qca: Use del_timer_sync() before freeing 2022-06-06 08:42:43 +02:00
hci_serdev.c Bluetooth: hci_{ldisc,serdev}: check percpu_init_rwsem() failure 2022-10-26 13:25:21 +02:00
hci_uart.h
…
hci_vhci.c Bluetooth: vhci: Set HCI_QUIRK_VALID_LE_STATES 2022-01-27 10:54:18 +01:00