Skip to content

Commit f3c4c00

Browse files
Zqiangfbq
authored andcommitted
rcu/nocb: Check rdp_gp->nocb_timer in __call_rcu_nocb_wake()
Currently, only rdp_gp->nocb_timer is used, for nocb_timer of no-rdp_gp structure, the timer_pending() is always return false, this commit therefore need to check rdp_gp->nocb_timer in __call_rcu_nocb_wake(). Signed-off-by: Zqiang <qiang.zhang1211@gmail.com> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Reviewed-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
1 parent dda9881 commit f3c4c00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/rcu/tree_nocb.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ static void __call_rcu_nocb_wake(struct rcu_data *rdp, bool was_alldone,
564564
long lazy_len;
565565
long len;
566566
struct task_struct *t;
567+
struct rcu_data *rdp_gp = rdp->nocb_gp_rdp;
567568

568569
// If we are being polled or there is no kthread, just leave.
569570
t = READ_ONCE(rdp->nocb_gp_kthread);
@@ -608,7 +609,7 @@ static void __call_rcu_nocb_wake(struct rcu_data *rdp, bool was_alldone,
608609
smp_mb(); /* Enqueue before timer_pending(). */
609610
if ((rdp->nocb_cb_sleep ||
610611
!rcu_segcblist_ready_cbs(&rdp->cblist)) &&
611-
!timer_pending(&rdp->nocb_timer)) {
612+
!timer_pending(&rdp_gp->nocb_timer)) {
612613
rcu_nocb_unlock(rdp);
613614
wake_nocb_gp_defer(rdp, RCU_NOCB_WAKE_FORCE,
614615
TPS("WakeOvfIsDeferred"));

0 commit comments

Comments
 (0)