mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
rcutorture: Check for unwatched readers
RCU is supposed to be watching all non-idle kernel code and also all softirq handlers. This commit adds some teeth to this statement by adding a WARN_ON_ONCE(). Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
parent
bc77a72cd1
commit
7752275118
1 changed files with 1 additions and 0 deletions
|
@ -1377,6 +1377,7 @@ static bool rcu_torture_one_read(struct torture_random_state *trsp)
|
||||||
struct rt_read_seg *rtrsp1;
|
struct rt_read_seg *rtrsp1;
|
||||||
unsigned long long ts;
|
unsigned long long ts;
|
||||||
|
|
||||||
|
WARN_ON_ONCE(!rcu_is_watching());
|
||||||
newstate = rcutorture_extend_mask(readstate, trsp);
|
newstate = rcutorture_extend_mask(readstate, trsp);
|
||||||
rcutorture_one_extend(&readstate, newstate, trsp, rtrsp++);
|
rcutorture_one_extend(&readstate, newstate, trsp, rtrsp++);
|
||||||
started = cur_ops->get_gp_seq();
|
started = cur_ops->get_gp_seq();
|
||||||
|
|
Loading…
Reference in a new issue