From: Paul E. McKenney Date: Wed, 10 Jul 2019 19:54:56 +0000 (-0700) Subject: rcu/nocb: Advance CBs after merge in rcutree_migrate_callbacks() X-Git-Tag: v5.4-rc1~181^2~1^2^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=23651d9b9616060cf86af5e3b15defcf3bcd2642;p=thirdparty%2Fkernel%2Flinux.git rcu/nocb: Advance CBs after merge in rcutree_migrate_callbacks() The rcutree_migrate_callbacks() invokes rcu_advance_cbs() on both the offlined CPU's ->cblist and that of the surviving CPU, then merges them. However, after the merge, and of the offlined CPU's callbacks that were not ready to be invoked will no longer be associated with a grace-period number. This commit therefore invokes rcu_advance_cbs() one more time on the merged ->cblist in order to assign a grace-period number to these callbacks. Signed-off-by: Paul E. McKenney --- diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 457623100d123..3e89b5b83ea01 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -3205,6 +3205,7 @@ void rcutree_migrate_callbacks(int cpu) needwake = rcu_advance_cbs(my_rnp, rdp) || rcu_advance_cbs(my_rnp, my_rdp); rcu_segcblist_merge(&my_rdp->cblist, &rdp->cblist); + needwake = needwake || rcu_advance_cbs(my_rnp, my_rdp); rcu_segcblist_disable(&rdp->cblist); WARN_ON_ONCE(rcu_segcblist_empty(&my_rdp->cblist) != !rcu_segcblist_n_cbs(&my_rdp->cblist));