Peter Hurley 7bb59df83b Bluetooth: Fix hidp disconnect deadlocks and lost wakeup
Partial revert of commit aabf6f89. When the hidp session thread
was converted from kernel_thread to kthread, the atomic/wakeups
were replaced with kthread_stop. kthread_stop has blocking semantics
which are inappropriate for the hidp session kthread. In addition,
the kthread signals itself to terminate in hidp_process_hid_control()
- it cannot do this with kthread_stop().

Lastly, a wakeup can be lost if the wakeup happens between checking
for the loop exit condition and setting the current state to
TASK_INTERRUPTIBLE. (Without appropriate synchronization mechanisms,
the task state should not be changed between the condition test and
the yield - via schedule() - as this creates a race between the
wakeup and resetting the state back to interruptible.)

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-06-30 15:47:50 -03:00
..
2011-05-23 16:29:24 -04:00
2011-05-27 13:07:21 -04:00
2011-04-17 00:48:31 -07:00
2011-03-14 17:02:42 -07:00
2011-01-12 19:00:40 -08:00
2011-05-24 01:13:12 -04:00
2011-03-21 18:16:39 -07:00
2011-05-13 14:55:21 -04:00
2011-05-24 01:13:12 -04:00
2011-06-08 14:19:05 -04:00
2011-05-24 01:13:12 -04:00
2011-05-24 01:13:12 -04:00
2011-05-24 01:13:12 -04:00
2011-03-31 11:26:23 -03:00
2011-05-25 17:55:32 -04:00
2011-05-24 01:13:12 -04:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-05-05 11:10:14 -07:00
2011-04-29 10:20:53 -07:00
2010-10-15 15:53:27 +02:00