From 232d4170df6338a65603079ec547e6f9f473f4b6 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Fri, 7 Oct 2011 18:22:05 +0200 Subject: [PATCH] --- yaml --- r: 277207 b: refs/heads/master c: 867f236bd12f5091df6dc7cc75f94d7fd982d78a h: refs/heads/master i: 277205: 1f34b5b4ac4134f5b1e46525a0b118b877f94020 277203: f13d1ce17fae7cafe150c3754c4068de40e5a6a1 277199: 71813352dfbd7ba90526c10bdbd663396fd0a51b v: v3 --- [refs] | 2 +- trunk/include/linux/srcu.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 81a49766418d..c6d4f4bd90d5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ff195cb69ba8d2af9b891be3a26db95fe1999d43 +refs/heads/master: 867f236bd12f5091df6dc7cc75f94d7fd982d78a diff --git a/trunk/include/linux/srcu.h b/trunk/include/linux/srcu.h index 4e0a3d41dae3..d4b12443b2ef 100644 --- a/trunk/include/linux/srcu.h +++ b/trunk/include/linux/srcu.h @@ -84,6 +84,9 @@ long srcu_batches_completed(struct srcu_struct *sp); * this assumes we are in an SRCU read-side critical section unless it can * prove otherwise. * + * Checks debug_lockdep_rcu_enabled() to prevent false positives during boot + * and while lockdep is disabled. + * * Note that if the CPU is in the idle loop from an RCU point of view * (ie: that we are in the section between rcu_idle_enter() and * rcu_idle_exit()) then srcu_read_lock_held() returns false even if @@ -102,7 +105,7 @@ static inline int srcu_read_lock_held(struct srcu_struct *sp) if (rcu_is_cpu_idle()) return 0; - if (!debug_locks) + if (!debug_lockdep_rcu_enabled()) return 1; return lock_is_held(&sp->dep_map);