Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v1] Bluetooth: Fix kernel oops triggered by hci_adv_monitors_clear()
@ 2020-06-30  3:15 Miao-chen Chou
  2020-06-30  6:51 ` Marcel Holtmann
  2020-07-07 15:38 ` Marcel Holtmann
  0 siblings, 2 replies; 6+ messages in thread
From: Miao-chen Chou @ 2020-06-30  3:15 UTC (permalink / raw)
  To: Bluetooth Kernel Mailing List
  Cc: Marcel Holtmann, Alain Michaud, pavel, Miao-chen Chou,
	Abhishek Pandit-Subedi, David S. Miller, Jakub Kicinski,
	Johan Hedberg, linux-kernel, netdev

This fixes the kernel oops by removing unnecessary background scan
update from hci_adv_monitors_clear() which shouldn't invoke any work
queue.

The following test was performed.
- Run "rmmod btusb" and verify that no kernel oops is triggered.

Signed-off-by: Miao-chen Chou <mcchou@chromium.org>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: Alain Michaud <alainm@chromium.org>
---

 net/bluetooth/hci_core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5577cf9e2c7cd..77615161c7d72 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3005,8 +3005,6 @@ void hci_adv_monitors_clear(struct hci_dev *hdev)
 		hci_free_adv_monitor(monitor);
 
 	idr_destroy(&hdev->adv_monitors_idr);
-
-	hci_update_background_scan(hdev);
 }
 
 void hci_free_adv_monitor(struct adv_monitor *monitor)
-- 
2.26.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30  3:15 [PATCH v1] Bluetooth: Fix kernel oops triggered by hci_adv_monitors_clear() Miao-chen Chou
2020-06-30  6:51 ` Marcel Holtmann
2020-06-30 21:55   ` Miao-chen Chou
2020-07-06 21:05     ` Miao-chen Chou
2020-07-07 15:38 ` Marcel Holtmann
2020-07-12  7:46   ` Pavel Machek

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git