rcu: Remove redundant check for rcu_head misalignment
[deliverable/linux.git] / kernel / rcupdate.c
index 2bc4e135ff23d6a9799e5c7292f0767ef840d3b4..a86f1741cc27fd465a24df4d81811c1e2d68c556 100644 (file)
@@ -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);
This page took 0.025059 seconds and 5 git commands to generate.