summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2011-02-15 20:22:03 -0300
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-16 16:33:24 -0300
commitc6f3c5f7f2938d2809bcc15889e9aa212038a554 (patch)
treea7ba2033d33a2973ad1e0ee3a6ea78aa3dfb78ee /net/bluetooth
parentde73115a7d67e1b81dbde2285a7657f3e3867703 (diff)
Bluetooth: Fix crash when ioctl(HCIUARTSETPROTO) fails
If the fail happens the HCI del_timer may timeout after the the hci dev unregister. This lead to a kernel crash. Reported-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 173bebd42825..c01415bc8946 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1199,6 +1199,8 @@ int hci_unregister_dev(struct hci_dev *hdev)
hci_unregister_sysfs(hdev);
+ hci_del_off_timer(hdev);
+
destroy_workqueue(hdev->workqueue);
hci_dev_lock_bh(hdev);