• Paul E. McKenney's avatar
    rcu: Tighten rcu_advance_cbs_nowake() checks · 614ddad1
    Paul E. McKenney authored
    Currently, rcu_advance_cbs_nowake() checks that a grace period is in
    progress, however, that grace period could end just after the check.
    This commit rechecks that a grace period is still in progress while
    holding the rcu_node structure's lock.  The grace period cannot end while
    the current CPU's rcu_node structure's ->lock is held, thus avoiding
    false positives from the WARN_ON_ONCE().
    
    As Daniel Vacek noted, it is not necessary for the rcu_node structure
    to have a CPU that has not yet passed through its quiescent state.
    Tested-by: default avatarGuillaume Morin <guillaume@morinfr.org>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    614ddad1
tree.c 152 KB