summaryrefslogtreecommitdiffstats
path: root/kernel/rcu
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-10-19 14:52:41 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-12-11 09:17:39 -0800
commitefd88b02bb9e6b8b73a20ea611e5d07ed6d4af34 (patch)
tree0f84096dc8cc757f5c0c8b7c9de51dec0ccd9342 /kernel/rcu
parent9122caf99b85c0f16938419547d5a9a84ae287a4 (diff)
downloadtalos-obmc-linux-efd88b02bb9e6b8b73a20ea611e5d07ed6d4af34.tar.gz
talos-obmc-linux-efd88b02bb9e6b8b73a20ea611e5d07ed6d4af34.zip
rcu: Add comment giving debug strategy for double call_rcu()
The following statement has for some reason proven non-intuitive: WARN_ON_ONCE(rcu_segcblist_empty(&rdp->cblist) != (count == 0)); This commit therefore adds a comment that states that this warning usually triggers in response to a double call_rcu(), which is sort of like a double free. The comment also suggests building with CONFIG_DEBUG_OBJECTS_RCU_HEAD=y to track down the double call_rcu(). Reported-by: David Howells <dhowells@redhat.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu')
-rw-r--r--kernel/rcu/tree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index f9c0ca2ccf0c..1bdc0481aaf1 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2789,6 +2789,11 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
rdp->n_force_qs_snap = rsp->n_force_qs;
} else if (count < rdp->qlen_last_fqs_check - qhimark)
rdp->qlen_last_fqs_check = count;
+
+ /*
+ * The following usually indicates a double call_rcu(). To track
+ * this down, try building with CONFIG_DEBUG_OBJECTS_RCU_HEAD=y.
+ */
WARN_ON_ONCE(rcu_segcblist_empty(&rdp->cblist) != (count == 0));
local_irq_restore(flags);
OpenPOWER on IntegriCloud