linux-stable/drivers/bluetooth
youwan Wang 0048ddf045 Bluetooth: btusb: Add date->evt_skb is NULL check
[ Upstream commit 624820f7c8 ]

fix crash because of null pointers

[ 6104.969662] BUG: kernel NULL pointer dereference, address: 00000000000000c8
[ 6104.969667] #PF: supervisor read access in kernel mode
[ 6104.969668] #PF: error_code(0x0000) - not-present page
[ 6104.969670] PGD 0 P4D 0
[ 6104.969673] Oops: 0000 [#1] SMP NOPTI
[ 6104.969684] RIP: 0010:btusb_mtk_hci_wmt_sync+0x144/0x220 [btusb]
[ 6104.969688] RSP: 0018:ffffb8d681533d48 EFLAGS: 00010246
[ 6104.969689] RAX: 0000000000000000 RBX: ffff8ad560bb2000 RCX: 0000000000000006
[ 6104.969691] RDX: 0000000000000000 RSI: ffffb8d681533d08 RDI: 0000000000000000
[ 6104.969692] RBP: ffffb8d681533d70 R08: 0000000000000001 R09: 0000000000000001
[ 6104.969694] R10: 0000000000000001 R11: 00000000fa83b2da R12: ffff8ad461d1d7c0
[ 6104.969695] R13: 0000000000000000 R14: ffff8ad459618c18 R15: ffffb8d681533d90
[ 6104.969697] FS:  00007f5a1cab9d40(0000) GS:ffff8ad578200000(0000) knlGS:00000
[ 6104.969699] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 6104.969700] CR2: 00000000000000c8 CR3: 000000018620c001 CR4: 0000000000760ef0
[ 6104.969701] PKRU: 55555554
[ 6104.969702] Call Trace:
[ 6104.969708]  btusb_mtk_shutdown+0x44/0x80 [btusb]
[ 6104.969732]  hci_dev_do_close+0x470/0x5c0 [bluetooth]
[ 6104.969748]  hci_rfkill_set_block+0x56/0xa0 [bluetooth]
[ 6104.969753]  rfkill_set_block+0x92/0x160
[ 6104.969755]  rfkill_fop_write+0x136/0x1e0
[ 6104.969759]  __vfs_write+0x18/0x40
[ 6104.969761]  vfs_write+0xdf/0x1c0
[ 6104.969763]  ksys_write+0xb1/0xe0
[ 6104.969765]  __x64_sys_write+0x1a/0x20
[ 6104.969769]  do_syscall_64+0x51/0x180
[ 6104.969771]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 6104.969773] RIP: 0033:0x7f5a21f18fef
[ 6104.9] RSP: 002b:00007ffeefe39010 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
[ 6104.969780] RAX: ffffffffffffffda RBX: 000055c10a7560a0 RCX: 00007f5a21f18fef
[ 6104.969781] RDX: 0000000000000008 RSI: 00007ffeefe39060 RDI: 0000000000000012
[ 6104.969782] RBP: 00007ffeefe39060 R08: 0000000000000000 R09: 0000000000000017
[ 6104.969784] R10: 00007ffeefe38d97 R11: 0000000000000293 R12: 0000000000000002
[ 6104.969785] R13: 00007ffeefe39220 R14: 00007ffeefe391a0 R15: 000055c10a72acf0

Signed-off-by: youwan Wang <wangyouwan@126.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-28 17:14:43 +00:00
..
Kconfig Bluetooth: Add vhci devcoredump support 2023-04-23 21:58:21 -07:00
Makefile Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets 2023-04-23 21:51:55 -07:00
ath3k.c Bluetooth: ath3k: remove superfluous header files 2022-03-18 17:12:09 +01:00
bcm203x.c Bluetooth: bcm203x: remove superfluous header files 2022-03-18 17:12:09 +01:00
bfusb.c Bluetooth: bfusb: fix division by zero in send path 2021-10-25 15:04:46 +02:00
bluecard_cs.c
bpa10x.c
bt3c_cs.c
btbcm.c Bluetooth: hci_bcm: Fall back to getting bdaddr from EFI if not set 2023-04-23 22:00:18 -07:00
btbcm.h Bluetooth: hci_bcm: Add support for FW loading in autobaud mode 2022-07-21 17:04:38 -07:00
btintel.c Bluetooth: HCI: Introduce HCI_QUIRK_BROKEN_LE_CODED 2023-09-13 09:53:57 +02:00
btintel.h Bluetooth: btintel: Add Intel devcoredump support 2023-04-23 21:59:02 -07:00
btmrvl_debugfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE 2022-06-10 14:51:36 +02:00
btmrvl_drv.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE 2022-06-10 14:51:36 +02:00
btmrvl_main.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE 2022-06-10 14:51:36 +02:00
btmrvl_sdio.c Bluetooth: btmrvl_sdio: mark OF related data as maybe unused 2023-04-23 21:49:18 -07:00
btmrvl_sdio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE 2022-06-10 14:51:36 +02:00
btmtk.c Bluetooth: btmtkuart: rely on BT_MTK module 2022-03-18 17:12:07 +01:00
btmtk.h Bluetooth: btmtkuart: rely on BT_MTK module 2022-03-18 17:12:07 +01:00
btmtksdio.c Bluetooth: btmtksdio: Add in-band wakeup support 2022-07-21 17:08:03 -07:00
btmtkuart.c Bluetooth: btmtkuart: mark OF related data as maybe unused 2023-04-23 21:49:47 -07:00
btnxpuart.c Bluetooth: btnxpuart: Fix compiler warnings 2023-05-19 15:38:29 -07:00
btqca.c Bluetooth: btqca: use le32_to_cpu for ver.soc_id 2023-06-29 10:48:35 -07:00
btqca.h Bluetooth: hci_qca: Add support for QTI Bluetooth chip wcn6855 2023-04-23 21:57:28 -07:00
btqcomsmd.c Bluetooth: btqcomsmd: Fix command timeout after setting BD address 2023-03-23 13:09:38 -07:00
btrsi.c Bluetooth: btrsi: remove superfluous header files from btrsi.c 2021-09-29 00:13:48 +02:00
btrtl.c Bluetooth: msft: Extended monitor tracking by address filter 2023-09-13 09:53:57 +02:00
btrtl.h Bluetooth: btrtl: Firmware format v2 support 2023-04-23 22:06:09 -07:00
btsdio.c Revert "Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work" 2023-04-23 22:04:52 -07:00
btusb.c Bluetooth: btusb: Add date->evt_skb is NULL check 2023-11-28 17:14:43 +00:00
dtl1_cs.c
h4_recv.h
hci_ag6xx.c Bluetooth: hci_uart: Remove redundant assignment to fw_ptr 2021-06-26 07:52:41 +02:00
hci_ath.c
hci_bcm.c Bluetooth: hci_bcm: do not mark valid bd_addr as invalid 2023-06-29 10:52:08 -07:00
hci_bcm4377.c Bluetooth: hci_bcm4377: Mark bcm4378/bcm4387 as BROKEN_LE_CODED 2023-11-08 14:09:05 +01:00
hci_bcsp.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
hci_h4.c Bluetooth: hci_h4: Fix padding calculation error within h4_recv_buf() 2021-11-16 13:57:25 +01:00
hci_h5.c Bluetooth: hci_h5: Complements reliable packet processing logic 2023-04-23 22:00:04 -07:00
hci_intel.c Bluetooth: hci_intel: Add check for platform_driver_register 2022-07-21 17:05:10 -07:00
hci_ldisc.c Bluetooth: hci_ldisc: Fix tty_set_termios() return value assumptions 2023-04-23 21:50:55 -07:00
hci_ll.c Bluetooth: hci_ll: drop of_match_ptr for ID table 2023-04-23 21:49:03 -07:00
hci_mrvl.c Bluetooth: hci_mrvl: Add serdev support for 88W8997 2023-04-23 21:45:29 -07:00
hci_nokia.c Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe() 2023-09-13 09:53:06 +02:00
hci_qca.c Bluetooth: hci_qca: fix debugfs registration 2023-06-05 17:13:14 -07:00
hci_serdev.c Bluetooth: hci_{ldisc,serdev}: check percpu_init_rwsem() failure 2022-09-19 10:33:39 -07:00
hci_uart.h Bluetooth: hci_h5: Disable the hci_suspend_notifier for btrtl devices 2021-07-22 16:06:09 +02:00
hci_vhci.c Bluetooth: vhci: Fix race when opening vhci device 2023-10-25 12:16:09 +02:00
virtio_bt.c virtio_bt: call scheduler when we free unused buffs 2023-07-03 12:15:12 -04:00