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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user