]> git.karo-electronics.de Git - linux-beck.git/commit
rcu: Prevent spurious-wakeup DoS attack on rcu_gp_kthread()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 9 Aug 2013 04:44:31 +0000 (21:44 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 23 Sep 2013 16:16:11 +0000 (09:16 -0700)
commit88d6df612cc3c99f56cc18461fcc531c3a145544
tree3f3c9e77bea5a07bf4570a4313d66eb80a58f6ee
parentf7be82093952ee4a74ffc8c729b2811f908cd9a4
rcu: Prevent spurious-wakeup DoS attack on rcu_gp_kthread()

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: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcutree.c