summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2010-06-07 17:09:45 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2010-06-23 06:50:45 -0700
commit94bfa3b6692c7a3f6f119596724204ec975d3ef0 (patch)
tree4c59cc890ed6fa0f1922416e6cbb7c87ecc8c3dc
parentf3b577dec1f2ce32d2db6d2ca6badff7002512af (diff)
downloadlinux-stable-94bfa3b6692c7a3f6f119596724204ec975d3ef0.tar.gz
linux-stable-94bfa3b6692c7a3f6f119596724204ec975d3ef0.tar.bz2
linux-stable-94bfa3b6692c7a3f6f119596724204ec975d3ef0.zip
idr: fix RCU lockdep splat in idr_get_next()
Convert to rcu_dereference_raw() given that many callers may have many different locking models. Located-by: Miles Lane <miles.lane@gmail.com> Tested-by: Miles Lane <miles.lane@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-rw-r--r--lib/idr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/idr.c b/lib/idr.c
index c1a206901761..7f1a4f0acf50 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -602,7 +602,7 @@ void *idr_get_next(struct idr *idp, int *nextidp)
/* find first ent */
n = idp->layers * IDR_BITS;
max = 1 << n;
- p = rcu_dereference(idp->top);
+ p = rcu_dereference_raw(idp->top);
if (!p)
return NULL;
@@ -610,7 +610,7 @@ void *idr_get_next(struct idr *idp, int *nextidp)
while (n > 0 && p) {
n -= IDR_BITS;
*paa++ = p;
- p = rcu_dereference(p->ary[(id >> n) & IDR_MASK]);
+ p = rcu_dereference_raw(p->ary[(id >> n) & IDR_MASK]);
}
if (p) {