From f93cc070f25af4e051622c6271fd9ee7243d274c Mon Sep 17 00:00:00 2001 From: Ankit Verma Date: Wed, 25 Apr 2012 15:42:04 -0700 Subject: [PATCH] Bluetooth: Better locking when tearing down an HCI connection. Restarting Riva will abruptly disconnect the hci device, which can tear down the hci_conn struct on one processor while RFCOMM code is running on another. This would keep l2cap_chan_del from being executed while RFCOMM is in the middle of using a socket. CRs-fixed: 351273 Change-Id: I37c82cac022a1d1c0fd60791f7c15b56e2415850 Signed-off-by: Ankit Verma --- net/bluetooth/hci_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 2f9ddd39d36..da8b2dc7314 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -1563,7 +1563,7 @@ int hci_unregister_dev(struct hci_dev *hdev) list_del(&hdev->list); write_unlock_bh(&hci_dev_list_lock); - hci_dev_do_close(hdev, 0); + hci_dev_do_close(hdev, hdev->bus == HCI_SMD); for (i = 0; i < NUM_REASSEMBLY; i++) kfree_skb(hdev->reassembly[i]);