fixup! idr: Fix idr_get_next race with idr_remove
Add correct upstream code now the proper things have been backported. Change-Id: I1786d1ed1873826983d133b8d527dd4142c95a58
This commit is contained in:
1 parent
9d71b6de9d
commit
389ad466b2
1 file changed
+2
-3
@@ -238,10 +238,9 @@ void *idr_get_next_ul(struct idr *idr, unsigned long *nextid)
|
||||
entry = rcu_dereference_raw(*slot);
|
||||
if (!entry)
|
||||
continue;
|
||||
if (!radix_tree_deref_retry(entry))
|
||||
if (!xa_is_internal(entry))
|
||||
break;
|
||||
if (slot != (void *)&idr->idr_rt.rnode &&
|
||||
entry != (void *)RADIX_TREE_INTERNAL_NODE)
|
||||
if (slot != &idr->idr_rt.xa_head && !xa_is_retry(entry))
|
||||
break;
|
||||
slot = radix_tree_iter_retry(&iter);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user