[LV] Partial success and a Linux kernel bug

Maciej W. Rozycki macro at linux-mips.org
Tue Aug 28 13:38:36 CEST 2007


On Sat, 25 Aug 2007, Peter Firefly Lund wrote:

> To sum up: I need to send a small patch to the kernel janitors or
> Christoph Lameter who seems to be the last guy who touched the code in a
> significant way plus I need to try again with a bootp daemon running.
> And I need to download a userspace tarball :)

 FYI, I have got this small patch in my collection.  Please feel free to 
verify and push it upstream.

  Maciej

Signed-off-by: Maciej W. Rozycki <macro at linux-mips.org>

patch-vax-2.6.17-rc4-20070111-radix-maxindex-0
diff -up --recursive --new-file linux-vax-2.6.17-rc4-20070111.macro/lib/radix-tree.c linux-vax-2.6.17-rc4-20070111/lib/radix-tree.c
--- linux-vax-2.6.17-rc4-20070111.macro/lib/radix-tree.c	2006-10-31 19:05:50.000000000 +0000
+++ linux-vax-2.6.17-rc4-20070111/lib/radix-tree.c	2007-01-22 01:24:17.000000000 +0000
@@ -825,9 +825,11 @@ radix_tree_node_ctor(void *node, kmem_ca
 static __init unsigned long __maxindex(unsigned int height)
 {
 	unsigned int tmp = height * RADIX_TREE_MAP_SHIFT;
-	unsigned long index = (~0UL >> (RADIX_TREE_INDEX_BITS - tmp - 1)) >> 1;
+	unsigned long index;
 
-	if (tmp >= RADIX_TREE_INDEX_BITS)
+	if (tmp < RADIX_TREE_INDEX_BITS)
+		index = (~0UL >> (RADIX_TREE_INDEX_BITS - tmp - 1)) >> 1;
+	else
 		index = ~0UL;
 	return index;
 }
_______________________________________________
Linux-Vax mailing list
Linux-Vax at pergamentum.com
http://www.pergamentum.com/mailman/listinfo/linux-vax




More information about the Vax-linux mailing list