+ buglet-in-radix_tree_tag_set.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     buglet in radix_tree_tag_set

has been added to the -mm tree.  Its filename is

     buglet-in-radix_tree_tag_set.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>

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: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Acked-by: Nick Piggin <npiggin@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 lib/radix-tree.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN lib/radix-tree.c~buglet-in-radix_tree_tag_set lib/radix-tree.c
--- devel/lib/radix-tree.c~buglet-in-radix_tree_tag_set	2006-04-28 23:00:24.000000000 -0700
+++ devel-akpm/lib/radix-tree.c	2006-04-28 23:00:24.000000000 -0700
@@ -389,8 +389,7 @@ void *radix_tree_tag_set(struct radix_tr
 	struct radix_tree_node *slot;
 
 	height = root->height;
-	if (index > radix_tree_maxindex(height))
-		return NULL;
+	BUG_ON(index > radix_tree_maxindex(height))
 
 	slot = root->rnode;
 	shift = (height - 1) * RADIX_TREE_MAP_SHIFT;
_

Patches currently in -mm which might be from a.p.zijlstra@xxxxxxxxx are

buglet-in-radix_tree_tag_set.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux