Re: [bug] SLUB + mm/slab.c boot crash in -rc9

From: Ingo Molnar
Date: Tue Apr 15 2008 - 15:42:33 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> -#if !(NODES_WIDTH > 0 || NODES_SHIFT == 0)
> +#if NODES_WIDTH <= 0 || NODES_SHIFT == 0
> #define NODE_NOT_IN_PAGE_FLAGS
> #endif

Peter "radar eye" Zijlstra noticed an ugly and annoying typo in mm.h:

-#ifdef NODE_NOT_IN_PAGEFLAGS
+#ifdef NODE_NOT_IN_PAGE_FLAGS

but even with the full fix (see below) the same crash remains.

i think getting NODE_NOT_IN_PAGEFLAGS wrong seems to result in
non-optimal but still correct code - by virtue of NODES_MASK ending up
zero.

Ingo

----------------------->
Subject: nodes: shift fix
From: Ingo Molnar <mingo@xxxxxxx>
Date: Tue Apr 15 21:15:21 CEST 2008

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
include/linux/mm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux/include/linux/mm.h
===================================================================
--- linux.orig/include/linux/mm.h
+++ linux/include/linux/mm.h
@@ -424,7 +424,7 @@ static inline void set_compound_order(st
* We are going to use the flags for the page to node mapping if its in
* there. This includes the case where there is no node, so it is implicit.
*/
-#if !(NODES_WIDTH > 0 || NODES_SHIFT == 0)
+#if NODES_WIDTH <= 0 || NODES_SHIFT == 0
#define NODE_NOT_IN_PAGE_FLAGS
#endif

@@ -442,7 +442,7 @@ static inline void set_compound_order(st
#define ZONES_PGSHIFT (ZONES_PGOFF * (ZONES_WIDTH != 0))

/* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */
-#ifdef NODE_NOT_IN_PAGEFLAGS
+#ifdef NODE_NOT_IN_PAGE_FLAGS
#define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT)
#define ZONEID_PGOFF ((SECTIONS_PGOFF < ZONES_PGOFF)? \
SECTIONS_PGOFF : ZONES_PGOFF)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/