]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix __hci_req_sync
authorAndre Guedes <andre.guedes@openbossa.org>
Fri, 8 Mar 2013 14:20:13 +0000 (11:20 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Sat, 9 Mar 2013 20:10:13 +0000 (17:10 -0300)
commitc006ab0ed28963f060dd1cca3ca8d28af2efd7c8
tree9b6c9c535389a069b6b6ded72f797c77559ad81d
parent1374fc323696be2f32cfb6eca4b292a908b31410
Bluetooth: Fix __hci_req_sync

If hci_req_run returns error, we erroneously leave the current
process in TASK_INTERRUPTABLE state. If we leave the process in
TASK_INTERRUPTABLE and it is preempted, this process will never
be scheduled again.

This patch fixes this issue by moving the preparation for scheduling
(add to waitqueue and set process state) to just after the hci_req_run
call.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/hci_core.c