]> git.baikalelectronics.ru Git - kernel.git/commit
workqueue: Add RCU annotation for pwq list walk
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 15 Nov 2019 18:01:25 +0000 (19:01 +0100)
committerTejun Heo <tj@kernel.org>
Fri, 15 Nov 2019 19:53:35 +0000 (11:53 -0800)
commitdbc25e35866671d83d776710817667fd50f9a267
tree46cce09b371206318000616b04536aa16f189e46
parent03a569ea35aaab8fd91e2dff10e4f90e0277968d
workqueue: Add RCU annotation for pwq list walk

An additional check has been recently added to ensure that a RCU related lock
is held while the RCU list is iterated.
The `pwqs' are sometimes iterated without a RCU lock but with the &wq->mutex
acquired leading to a warning.

Teach list_for_each_entry_rcu() that the RCU usage is okay if &wq->mutex
is acquired during the list traversal.

Fixes: 2df833dd4d932 ("rcu: Add support for consolidated-RCU reader checking")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c