X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=kernel%2Frcupdate.c;h=a86f1741cc27fd465a24df4d81811c1e2d68c556;hb=ce5df97be530e4746bf9a4ac14589a1cfdfd8efc;hp=2bc4e135ff23d6a9799e5c7292f0767ef840d3b4;hpb=00b1d444afc2e5c3129b4a9c16b1de03c0fce3f0;p=deliverable%2Flinux.git diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index 2bc4e135ff23..a86f1741cc27 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c @@ -88,6 +88,9 @@ EXPORT_SYMBOL_GPL(debug_lockdep_rcu_enabled); * section. * * Check debug_lockdep_rcu_enabled() to prevent false positives during boot. + * + * Note that rcu_read_lock() is disallowed if the CPU is either idle or + * offline from an RCU perspective, so check for those as well. */ int rcu_read_lock_bh_held(void) { @@ -95,6 +98,8 @@ int rcu_read_lock_bh_held(void) return 1; if (rcu_is_cpu_idle()) return 0; + if (!rcu_lockdep_current_cpu_online()) + return 0; return in_softirq() || irqs_disabled(); } EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held);