path: root/Documentation/atomic_t.txt
diff options
authorPeter Zijlstra <>2017-08-23 12:52:32 +0200
committerIngo Molnar <>2017-08-25 11:06:32 +0200
commita1d14934ea4b9db816a8dbfeab1c3e7204a0d871 (patch)
treef2d6a33fdf8eed83fbe4e2d04c7989700aab2138 /Documentation/atomic_t.txt
parente91498589746065e3ae95d9a00b068e525eec34f (diff)
workqueue/lockdep: 'Fix' flush_work() annotation
The flush_work() annotation as introduced by commit: e159489baa71 ("workqueue: relax lockdep annotation on flush_work()") hits on the lockdep problem with recursive read locks. The situation as described is: Work W1: Work W2: Task: ARR(Q) ARR(Q) flush_workqueue(Q) A(W1) A(W2) A(Q) flush_work(W2) R(Q) A(W2) R(W2) if (special) A(Q) else ARR(Q) R(Q) where: A - acquire, ARR - acquire-read-recursive, R - release. Where under 'special' conditions we want to trigger a lock recursion deadlock, but otherwise allow the flush_work(). The allowing is done by using recursive read locks (ARR), but lockdep is broken for recursive stuff. However, there appears to be no need to acquire the lock if we're not 'special', so if we remove the 'else' clause things become much simpler and no longer need the recursion thing at all. Signed-off-by: Peter Zijlstra (Intel) <> Acked-by: Tejun Heo <> Cc: Linus Torvalds <> Cc: Peter Zijlstra <> Cc: Thomas Gleixner <> Cc: Cc: Cc: Cc: Cc: Signed-off-by: Ingo Molnar <>
Diffstat (limited to 'Documentation/atomic_t.txt')
0 files changed, 0 insertions, 0 deletions