• Paul E. McKenney's avatar
    rcu: Prevent spurious-wakeup DoS attack on rcu_gp_kthread() · 88d6df61
    Paul E. McKenney authored
    Spurious wakeups in the force-quiescent-state loop in rcu_gp_kthread()
    cause the timeout to be recalculated, which would prevent rcu_gp_fqs()
    from ever being called.  This would in turn would prevent the grace period
    from ever ending for as long as there was at least one CPU in an extended
    quiescent state that had not yet passed through a quiescent state.
    
    This commit therefore avoids recalculating the timeout unless the
    previous pass's call to wait_event_interruptible_timeout() actually
    did time out, thus preventing the above scenario.
    Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
    88d6df61
rcutree.c 103 KB