Skip to content

Commit 7752275

Browse files
committed
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 <[email protected]>
1 parent bc77a72 commit 7752275

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/rcu/rcutorture.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,7 @@ static bool rcu_torture_one_read(struct torture_random_state *trsp)
13771377
struct rt_read_seg *rtrsp1;
13781378
unsigned long long ts;
13791379

1380+
WARN_ON_ONCE(!rcu_is_watching());
13801381
newstate = rcutorture_extend_mask(readstate, trsp);
13811382
rcutorture_one_extend(&readstate, newstate, trsp, rtrsp++);
13821383
started = cur_ops->get_gp_seq();

0 commit comments

Comments
 (0)