1
0
Fork 0
alistair23-linux/tools/testing/radix-tree
Matthew Wilcox eff3860bbf radix tree: Don't return retry entries from lookup
Commit 66ee620f06 ("idr: Permit any valid kernel pointer to be stored")
changed the radix tree lookup so that it stops when reaching the bottom
of the tree.  However, the condition was added in the wrong place,
making it possible to return retry entries to the caller.  Reorder the
tests to check for the retry entry before checking whether we're at the
bottom of the tree.  The retry entry should never be found in the tree
root, so it's safe to defer the check until the end of the loop.

Add a regression test to the test-suite to be sure this doesn't come
back.

Fixes: 66ee620f06 ("idr: Permit any valid kernel pointer to be stored")
Reported-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-12-06 08:26:16 -05:00
..
generated radix tree: Remove multiorder support 2018-10-21 10:46:48 -04:00
linux xarray: Add XArray unconditional store operations 2018-10-21 10:45:57 -04:00
.gitignore xarray: Add XArray load operation 2018-10-21 10:45:57 -04:00
Makefile radix tree: Don't return retry entries from lookup 2018-12-06 08:26:16 -05:00
benchmark.c radix tree test suite: Remove multiorder benchmarking 2018-10-21 10:46:47 -04:00
bitmap.c xarray: Add XArray unconditional store operations 2018-10-21 10:45:57 -04:00
idr-test.c ida: Convert to XArray 2018-10-21 10:46:33 -04:00
iteration_check.c radix tree test suite: Convert iteration test to XArray 2018-10-21 10:46:45 -04:00
linux.c radix tree test suite: Fix build 2018-02-25 06:00:11 -05:00
main.c radix tree: Don't return retry entries from lookup 2018-12-06 08:26:16 -05:00
multiorder.c radix tree test: Convert multiorder tests to XArray 2018-10-21 10:46:48 -04:00
regression.h radix tree: Don't return retry entries from lookup 2018-12-06 08:26:16 -05:00
regression1.c radix tree test suite: Convert tag_tagged_items to XArray 2018-10-21 10:46:45 -04:00
regression2.c radix tree test suite: Convert tag_tagged_items to XArray 2018-10-21 10:46:45 -04:00
regression3.c page cache: Convert find_get_pages_contig to XArray 2018-10-21 10:46:34 -04:00
regression4.c radix tree: Don't return retry entries from lookup 2018-12-06 08:26:16 -05:00
tag_check.c radix tree test suite: Convert tag_tagged_items to XArray 2018-10-21 10:46:45 -04:00
test.c radix tree tests: Convert item_delete_rcu to XArray 2018-10-21 10:46:48 -04:00
test.h radix tree tests: Convert item_delete_rcu to XArray 2018-10-21 10:46:48 -04:00
xarray.c xarray: Add XArray load operation 2018-10-21 10:45:57 -04:00