[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070713083732.GC21833@joejin-pc.cn.oracle.com>
Date: Fri, 13 Jul 2007 16:37:32 +0800
From: Joe Jin <joe.jin@...cle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Joe Jin <joe.jin@...cle.com>, bill.irwin@...cle.com,
linux-kernel@...r.kernel.org, gurudas.pai@...cle.com
Subject: Re: [PATCH] Add nid sanity on alloc_pages_node
>
> 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 <joe.jin@...cle.com>
---
--- 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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists