diff options
author | Tejun Heo <tj@kernel.org> | 2010-07-02 10:03:51 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-07-02 10:03:51 +0200 |
commit | 4ce48b37bfedc2bc11e61eae76784887e88b922c (patch) | |
tree | 0829ba93c3bb5f586bacd11c3f21711b3de04da2 /Documentation/nommu-mmap.txt | |
parent | cb444766996395d4370bcc17ec895dd4e13ceb72 (diff) | |
download | kernel_samsung_smdk4412-4ce48b37bfedc2bc11e61eae76784887e88b922c.tar.gz kernel_samsung_smdk4412-4ce48b37bfedc2bc11e61eae76784887e88b922c.tar.bz2 kernel_samsung_smdk4412-4ce48b37bfedc2bc11e61eae76784887e88b922c.zip |
workqueue: fix race condition in flush_workqueue()
When one flusher is cascading to the next flusher, it first sets
wq->first_flusher to the next one and sets up the next flush cycle.
If there's nothing to do for the next cycle, it clears
wq->flush_flusher and proceeds to the one after that.
If the woken up flusher checks wq->first_flusher before it gets
cleared, it will incorrectly assume the role of the first flusher,
which triggers BUG_ON() sanity check.
Fix it by checking wq->first_flusher again after grabbing the mutex.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'Documentation/nommu-mmap.txt')
0 files changed, 0 insertions, 0 deletions