diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-10-05 11:45:18 -0700 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-13 11:01:43 -0500 |
commit | 9bfb4daf32ad9a659fdcaa405f3a47e426da3cf7 (patch) | |
tree | 6a5121e7d81d8461dca41c28a7b9ec8823dcbd90 /include/linux | |
parent | 876e9b8f884558427902a43eae111bf45f632b14 (diff) |
rcu: Make ksoftirqd do RCU quiescent states
Implementing RCU-bh in terms of RCU-preempt makes the system vulnerable
to network-based denial-of-service attacks. This patch therefore
makes __do_softirq() invoke rcu_bh_qs(), but only when __do_softirq()
is running in ksoftirqd context. A wrapper layer in interposed so that
other calls to __do_softirq() avoid invoking rcu_bh_qs(). The underlying
function __do_softirq_common() does the actual work.
The reason that rcu_bh_qs() is bad in these non-ksoftirqd contexts is
that there might be a local_bh_enable() inside an RCU-preempt read-side
critical section. This local_bh_enable() can invoke __do_softirq()
directly, so if __do_softirq() were to invoke rcu_bh_qs() (which just
calls rcu_preempt_qs() in the PREEMPT_RT_FULL case), there would be
an illegal RCU-preempt quiescent state in the middle of an RCU-preempt
read-side critical section. Therefore, quiescent states can only happen
in cases where __do_softirq() is invoked directly from ksoftirqd.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20111005184518.GA21601@linux.vnet.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/rcupdate.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 888d24ac66ba..aaf8b7dc360c 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -194,13 +194,7 @@ static inline int rcu_preempt_depth(void) /* Internal to kernel */ extern void rcu_sched_qs(int cpu); - -#ifndef CONFIG_PREEMPT_RT_FULL extern void rcu_bh_qs(int cpu); -#else -static inline void rcu_bh_qs(int cpu) { } -#endif - extern void rcu_check_callbacks(int cpu, int user); struct notifier_block; extern void rcu_idle_enter(void); |