linux-stable/drivers/bluetooth
Marcel Ziswiler 586e099c93 Bluetooth: btnxpuart: Fix btnxpuart_close
[ Upstream commit 664130c0b0 ]

Fix scheduling while atomic BUG in btnxpuart_close(), properly
purge the transmit queue and free the receive skb.

[   10.973809] BUG: scheduling while atomic: kworker/u9:0/80/0x00000002
...
[   10.980740] CPU: 3 PID: 80 Comm: kworker/u9:0 Not tainted 6.8.0-rc7-0.0.0-devel-00005-g61fdfceacf09 #1
[   10.980751] Hardware name: Toradex Verdin AM62 WB on Dahlia Board (DT)
[   10.980760] Workqueue: hci0 hci_power_off [bluetooth]
[   10.981169] Call trace:
...
[   10.981363]  uart_update_mctrl+0x58/0x78
[   10.981373]  uart_dtr_rts+0x104/0x114
[   10.981381]  tty_port_shutdown+0xd4/0xdc
[   10.981396]  tty_port_close+0x40/0xbc
[   10.981407]  uart_close+0x34/0x9c
[   10.981414]  ttyport_close+0x50/0x94
[   10.981430]  serdev_device_close+0x40/0x50
[   10.981442]  btnxpuart_close+0x24/0x98 [btnxpuart]
[   10.981469]  hci_dev_close_sync+0x2d8/0x718 [bluetooth]
[   10.981728]  hci_dev_do_close+0x2c/0x70 [bluetooth]
[   10.981862]  hci_power_off+0x20/0x64 [bluetooth]

Fixes: 689ca16e52 ("Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets")
Cc: stable@vger.kernel.org
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-03 15:11:19 +02: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
bcm203x.c
bfusb.c
bluecard_cs.c
bpa10x.c
bt3c_cs.c
btbcm.c Bluetooth: btbcm: add default address for BCM43430A1 2023-08-11 11:50:05 -07:00
btbcm.h
btintel.c Bluetooth: HCI: Introduce HCI_QUIRK_BROKEN_LE_CODED 2023-08-24 12:23:46 -07:00
btintel.h Bluetooth: btintel: Send new command for PPAG 2023-08-24 12:23:26 -07:00
btmrvl_debugfs.c
btmrvl_drv.h
btmrvl_main.c
btmrvl_sdio.c Bluetooth: btmrvl_sdio: mark OF related data as maybe unused 2023-04-23 21:49:18 -07:00
btmrvl_sdio.h
btmtk.c Bluetooth: btusb: Fix memory leak 2024-03-26 18:18:24 -04:00
btmtk.h Bluetooth: btmtk: Fix kernel crash when processing coredump 2023-08-11 11:48:58 -07:00
btmtksdio.c Bluetooth: btmtksdio: enable bluetooth wakeup in system suspend 2023-10-23 11:04:51 -07:00
btmtkuart.c Bluetooth: btmtkuart: fix recv_buf() return value 2024-01-25 15:44:56 -08:00
btnxpuart.c Bluetooth: btnxpuart: Fix btnxpuart_close 2024-04-03 15:11:19 +02:00
btqca.c Bluetooth: qca: Fix wrong event type for patch config command 2024-03-06 14:53:51 +00:00
btqca.h Bluetooth: qca: add support for QCA2066 2023-10-23 10:59:46 -07:00
btqcomsmd.c Bluetooth: btqcomsmd: Fix command timeout after setting BD address 2023-03-23 13:09:38 -07:00
btrsi.c
btrtl.c Bluetooth: btrtl: Ignore error return for hci_devcd_register() 2023-10-13 20:03:04 -07:00
btrtl.h Bluetooth: btrtl: Add Realtek devcoredump support 2023-08-11 11:35:14 -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: Fix memory leak 2024-03-26 18:18:24 -04:00
dtl1_cs.c
h4_recv.h
hci_ag6xx.c
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: do not mark valid bd_addr as invalid 2024-03-06 14:53:54 +00:00
hci_bcsp.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
hci_h4.c
hci_h5.c Bluetooth: btrtl: fix out of bounds memory access 2024-03-26 18:18:23 -04:00
hci_intel.c
hci_ldisc.c TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -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-08-11 11:50:41 -07:00
hci_qca.c Bluetooth: hci_qca: don't use IS_ERR_OR_NULL() with gpiod_get_optional() 2024-03-26 18:18:23 -04:00
hci_serdev.c Bluetooth: hci_h5: Add ability to allocate memory for private data 2024-03-26 18:18:23 -04:00
hci_uart.h Bluetooth: hci_h5: Add ability to allocate memory for private data 2024-03-26 18:18:23 -04:00
hci_vhci.c Bluetooth: Fix deadlock in vhci_send_frame 2023-12-15 11:29:16 -05:00
virtio_bt.c virtio_bt: call scheduler when we free unused buffs 2023-07-03 12:15:12 -04:00