Re: [PATCH 0/7] Fix various lost wakeups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Peter -

On Sun, 24 Jul 2011, Peter Hurley wrote:

Several kthreads, and some other functions which also wait/sleep, exhibit
race conditions when using set_current_state(TASK_INTERRUPTIBLE). A common,
but incorrect, usage pattern is:

1:  add_wait_queue(...);
2:  while (!condition) {
3:          set_current_state(TASK_INTERRUPTIBLE);
4:          do_work();
5:          schedule();
6:  }
7:  set current_state(TASK_RUNNING);
8:  remove_wait_queue(...);

<snip>

PS - I did not fix the usage in l2cap_core.c pending if the new ERTM
reassembly will make that work unnecessary.

I think your fix is needed in l2cap_core.c. ERTM reassembly (and other pending changes) won't be modifying that code.

Thanks,

--
Mat Martineau
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux