> 
> if (nid > MAX_NUMNODES) then that is a bug and we should report it (doing
> this via a BUG() is OK) rather than quietly covering it up.

I have create a patch to check if nid > MAX_NUMNODES, please apply it
thanks

Signed-off-by: Joe Jin <[EMAIL PROTECTED]>
---

--- linux-2.6.22/include/linux/gfp.h.orig       2007-07-12 15:06:23.000000000 
+0800
+++ linux-2.6.22/include/linux/gfp.h    2007-07-13 16:23:52.000000000 +0800
@@ -127,6 +127,8 @@ FASTCALL(__alloc_pages(gfp_t, unsigned i
 static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
                                                unsigned int order)
 {
+       BUG_ON(nid > MAX_NUMNODES);
+
        if (unlikely(order >= MAX_ORDER))
                return NULL;
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to