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:
Родитель
f3b577dec1
Коммит
94bfa3b669
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче