summaryrefslogtreecommitdiffstats
path: root/lib/interval_tree.c
diff options
context:
space:
mode:
authorMatthew Wilcox <mawilcox@microsoft.com>2018-02-26 20:39:30 +0100
committerMatthew Wilcox <mawilcox@microsoft.com>2018-02-26 20:39:30 +0100
commit4b0ad07653ee94182e2d8f21404242c9e83ad0b4 (patch)
tree88d581f08d2eac9d8b5d933c2740b91003e44401 /lib/interval_tree.c
parentradix tree test suite: Fix build (diff)
downloadlinux-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