From: Gustavo F. Padovan Date: Tue, 15 Feb 2011 23:22:03 +0000 (-0300) Subject: Bluetooth: Fix crash when ioctl(HCIUARTSETPROTO) fails X-Git-Tag: v3.0~349^2~16^2~578^2~196^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6f3c5f7f2938d2809bcc15889e9aa212038a554;p=platform%2Fkernel%2Flinux-amlogic.git 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 Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 173bebd..c01415b 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);