Skip to content
Commit 4c91c364 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Linus Torvalds
Browse files

[PATCH] buglet in radix_tree_tag_set



The comment states: 'Setting a tag on a not-present item is a BUG.' Hence
if 'index' is larger than the maxindex; the item _cannot_ be presen; it
should also be a BUG.

Also, this allows the following statement (assume a fresh tree):

  radix_tree_tag_set(root, 16, 1);

to fail silently, but when preceded by:

  radix_tree_insert(root, 32, item);

it would BUG, because the height has been extended by the insert.

In neither case was 16 present.

Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: default avatarNick Piggin <npiggin@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 58ce1fd5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment