Skip to content

Commit 3471e96

Browse files
paulmckrcuNeeraj Upadhyay
authored andcommitted
rcu/kfree: Warn on unexpected tail state
Within the rcu_sr_normal_gp_cleanup_work() function, there is an acquire load from rcu_state.srs_done_tail, which is expected to be non-NULL. This commit adds a WARN_ON_ONCE() to check this expectation. Signed-off-by: Paul E. McKenney <[email protected]> Signed-off-by: Neeraj Upadhyay <[email protected]>
1 parent 8400291 commit 3471e96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/rcu/tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,7 @@ static void rcu_sr_normal_gp_cleanup_work(struct work_struct *work)
16491649
* the done tail list manipulations are protected here.
16501650
*/
16511651
done = smp_load_acquire(&rcu_state.srs_done_tail);
1652-
if (!done)
1652+
if (WARN_ON_ONCE(!done))
16531653
return;
16541654

16551655
WARN_ON_ONCE(!rcu_sr_is_wait_head(done));

0 commit comments

Comments
 (0)