[PATCH 2/2 V4] workqueue: fix possible race condition when rescuer VS pwq-release

2014-04-18 Thread Lai Jiangshan
There is a race condition between rescuer_thread() and pwq_unbound_release_workfn(). The works of the @pwq may be processed by some other workers, and @pwq is scheduled to release(due to its wq's attr is changed) before the rescuer starts to process. In this case pwq_unbound_release_workfn() will

[PATCH 2/2 V4] workqueue: fix possible race condition when rescuer VS pwq-release

2014-04-18 Thread Lai Jiangshan
There is a race condition between rescuer_thread() and pwq_unbound_release_workfn(). The works of the @pwq may be processed by some other workers, and @pwq is scheduled to release(due to its wq's attr is changed) before the rescuer starts to process. In this case pwq_unbound_release_workfn() will