diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-15 18:22:03 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-16 14:33:24 -0500 |
commit | c6f3c5f7f2938d2809bcc15889e9aa212038a554 (patch) | |
tree | a7ba2033d33a2973ad1e0ee3a6ea78aa3dfb78ee /net/bluetooth | |
parent | de73115a7d67e1b81dbde2285a7657f3e3867703 (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.c | 2 |
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) | |||
1199 | 1199 | ||
1200 | hci_unregister_sysfs(hdev); | 1200 | hci_unregister_sysfs(hdev); |
1201 | 1201 | ||
1202 | hci_del_off_timer(hdev); | ||
1203 | |||
1202 | destroy_workqueue(hdev->workqueue); | 1204 | destroy_workqueue(hdev->workqueue); |
1203 | 1205 | ||
1204 | hci_dev_lock_bh(hdev); | 1206 | hci_dev_lock_bh(hdev); |