Skip to content

Commit

Permalink
Bluetooth: Fix crash when ioctl(HCIUARTSETPROTO) fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gustavo F. Padovan committed Feb 16, 2011
1 parent de73115 commit c6f3c5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c6f3c5f

Please sign in to comment.