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>
This commit is contained in:
parent
f3b577dec1
commit
94bfa3b669
1 changed files with 2 additions and 2 deletions
|
@ -602,7 +602,7 @@ void *idr_get_next(struct idr *idp, int *nextidp)
|
||||||
/* find first ent */
|
/* find first ent */
|
||||||
n = idp->layers * IDR_BITS;
|
n = idp->layers * IDR_BITS;
|
||||||
max = 1 << n;
|
max = 1 << n;
|
||||||
p = rcu_dereference(idp->top);
|
p = rcu_dereference_raw(idp->top);
|
||||||
if (!p)
|
if (!p)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -610,7 +610,7 @@ void *idr_get_next(struct idr *idp, int *nextidp)
|
||||||
while (n > 0 && p) {
|
while (n > 0 && p) {
|
||||||
n -= IDR_BITS;
|
n -= IDR_BITS;
|
||||||
*paa++ = p;
|
*paa++ = p;
|
||||||
p = rcu_dereference(p->ary[(id >> n) & IDR_MASK]);
|
p = rcu_dereference_raw(p->ary[(id >> n) & IDR_MASK]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p) {
|
if (p) {
|
||||||
|
|
Loading…
Reference in a new issue