mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
Bluetooth: Put HCI device if inquiry procedure interrupts
[ Upstream commit28a758c861
] Jump to the label done to decrement the reference count of HCI device hdev on path that the Inquiry procedure is interrupted. Fixes:3e13fa1e1f
("Bluetooth: Fix hci_inquiry ioctl usage") Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
9f2816a99a
commit
725cb22009
1 changed files with 4 additions and 2 deletions
|
@ -1317,8 +1317,10 @@ int hci_inquiry(void __user *arg)
|
|||
* cleared). If it is interrupted by a signal, return -EINTR.
|
||||
*/
|
||||
if (wait_on_bit(&hdev->flags, HCI_INQUIRY,
|
||||
TASK_INTERRUPTIBLE))
|
||||
return -EINTR;
|
||||
TASK_INTERRUPTIBLE)) {
|
||||
err = -EINTR;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
/* for unlimited number of responses we will use buffer with
|
||||
|
|
Loading…
Reference in a new issue