linux/tools/testing/radix-tree
Matthew Wilcox 4b0ad07653 idr: Fix handling of IDs above INT_MAX
Khalid reported that the kernel selftests are currently failing:

selftests: test_bpf.sh
========================================
test_bpf: [FAIL]
not ok 1..8 selftests:  test_bpf.sh [FAIL]

He bisected it to 6ce711f275 ("idr: Make
1-based IDRs more efficient").

The root cause is doing a signed comparison in idr_alloc_u32() instead
of an unsigned comparison.  I went looking for any similar problems and
found a couple (which would each result in the failure to warn in two
situations that aren't supposed to happen).

I knocked up a few test-cases to prove that I was right and added them
to the test-suite.

Reported-by: Khalid Aziz <khalid.aziz@oracle.com>
Tested-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
2018-02-26 14:39:30 -05:00
..
generated
linux radix tree test suite: Fix build 2018-02-25 06:00:11 -05:00
.gitignore
Makefile
benchmark.c
idr-test.c idr: Fix handling of IDs above INT_MAX 2018-02-26 14:39:30 -05:00
iteration_check.c
linux.c radix tree test suite: Fix build 2018-02-25 06:00:11 -05:00
main.c
multiorder.c
regression.h
regression1.c
regression2.c
regression3.c
tag_check.c
test.c
test.h