diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-06-07 20:09:45 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-06-23 09:50:45 -0400 |
commit | 94bfa3b6692c7a3f6f119596724204ec975d3ef0 (patch) | |
tree | 4c59cc890ed6fa0f1922416e6cbb7c87ecc8c3dc /lib/idr.c | |
parent | f3b577dec1f2ce32d2db6d2ca6badff7002512af (diff) |
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>
Diffstat (limited to 'lib/idr.c')
-rw-r--r-- | lib/idr.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -602,7 +602,7 @@ void *idr_get_next(struct idr *idp, int *nextidp) | |||
602 | /* find first ent */ | 602 | /* find first ent */ |
603 | n = idp->layers * IDR_BITS; | 603 | n = idp->layers * IDR_BITS; |
604 | max = 1 << n; | 604 | max = 1 << n; |
605 | p = rcu_dereference(idp->top); | 605 | p = rcu_dereference_raw(idp->top); |
606 | if (!p) | 606 | if (!p) |
607 | return NULL; | 607 | return NULL; |
608 | 608 | ||
@@ -610,7 +610,7 @@ void *idr_get_next(struct idr *idp, int *nextidp) | |||
610 | while (n > 0 && p) { | 610 | while (n > 0 && p) { |
611 | n -= IDR_BITS; | 611 | n -= IDR_BITS; |
612 | *paa++ = p; | 612 | *paa++ = p; |
613 | p = rcu_dereference(p->ary[(id >> n) & IDR_MASK]); | 613 | p = rcu_dereference_raw(p->ary[(id >> n) & IDR_MASK]); |
614 | } | 614 | } |
615 | 615 | ||
616 | if (p) { | 616 | if (p) { |