diff options
author | Matthew Wilcox <mawilcox@microsoft.com> | 2018-02-26 20:39:30 +0100 |
---|---|---|
committer | Matthew Wilcox <mawilcox@microsoft.com> | 2018-02-26 20:39:30 +0100 |
commit | 4b0ad07653ee94182e2d8f21404242c9e83ad0b4 (patch) | |
tree | 88d581f08d2eac9d8b5d933c2740b91003e44401 /lib/interval_tree.c | |
parent | radix tree test suite: Fix build (diff) | |
download | linux-4b0ad07653ee94182e2d8f21404242c9e83ad0b4.tar.xz linux-4b0ad07653ee94182e2d8f21404242c9e83ad0b4.zip |
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 6ce711f2750031d12cec91384ac5cfa0a485b60a ("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>
Diffstat (limited to 'lib/interval_tree.c')
0 files changed, 0 insertions, 0 deletions