diff options
author | Matthew Wilcox <mawilcox@microsoft.com> | 2017-01-31 00:22:30 +0300 |
---|---|---|
committer | Matthew Wilcox <mawilcox@microsoft.com> | 2017-02-14 05:44:05 +0300 |
commit | f7137f79c57f228321dde2ab4586015504feaaac (patch) | |
tree | 2e8fb8bf6e705b3b002f9f2d41b286b76571caff /lib/radix-tree.c | |
parent | d58275bc96ae933b1b3888af80920dd6b020c505 (diff) | |
download | linux-f7137f79c57f228321dde2ab4586015504feaaac.tar.xz |
radix_tree_iter_resume: Fix out of bounds error
The address sanitizer occasionally finds an out of bounds error while
running the test-suite. It turned out to be a read of the pointer
immediately next to the tree root, but this out of bounds error could
have occurred elsewhere. This happens because radix_tree_iter_resume()
dereferences 'slot' before checking whether we've come to the end of
the chunk. We can just delete this line; the value was never used.
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Diffstat (limited to 'lib/radix-tree.c')
-rw-r--r-- | lib/radix-tree.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index dcb9a2329e65..c1c079ffadcd 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c @@ -1685,7 +1685,6 @@ void **radix_tree_iter_resume(void **slot, struct radix_tree_iter *iter) slot++; iter->index = __radix_tree_iter_add(iter, 1); - node = rcu_dereference_raw(*slot); skip_siblings(&node, slot, iter); iter->next_index = iter->index; iter->tags = 0; |