From: Greg Kroah-Hartman Date: Sat, 23 Nov 2019 17:35:08 +0000 (+0100) Subject: fix up idr patch X-Git-Tag: v5.3.13~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a922f09033c6e0b3ea530400b767f1e1ee86ea85;p=thirdparty%2Fkernel%2Fstable-queue.git fix up idr patch --- diff --git a/queue-4.14/idr-fix-idr_get_next-race-with-idr_remove.patch b/queue-4.14/idr-fix-idr_get_next-race-with-idr_remove.patch index 542955c3e4d..03db9653921 100644 --- a/queue-4.14/idr-fix-idr_get_next-race-with-idr_remove.patch +++ b/queue-4.14/idr-fix-idr_get_next-race-with-idr_remove.patch @@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman - slot = radix_tree_iter_find(&idr->idr_rt, &iter, *nextid); + radix_tree_for_each_slot(slot, &idr->idr_rt, &iter, *nextid) { -+ entry = radix_tree_deref_slot(slot); ++ entry = rcu_dereference_raw(*slot); + if (!entry) + continue; + if (!radix_tree_deref_retry(entry)) diff --git a/queue-4.19/idr-fix-idr_get_next-race-with-idr_remove.patch b/queue-4.19/idr-fix-idr_get_next-race-with-idr_remove.patch index c2befcd8439..f90d20a8400 100644 --- a/queue-4.19/idr-fix-idr_get_next-race-with-idr_remove.patch +++ b/queue-4.19/idr-fix-idr_get_next-race-with-idr_remove.patch @@ -47,7 +47,7 @@ Signed-off-by: Greg Kroah-Hartman id = (id < base) ? 0 : id - base; - slot = radix_tree_iter_find(&idr->idr_rt, &iter, id); + radix_tree_for_each_slot(slot, &idr->idr_rt, &iter, id) { -+ entry = radix_tree_deref_slot(slot); ++ entry = rcu_dereference_raw(*slot); + if (!entry) + continue; + if (!radix_tree_deref_retry(entry))