[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070713011543.22797645.akpm@linux-foundation.org>
Date: Fri, 13 Jul 2007 01:15:43 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Joe Jin <joe.jin@...cle.com>
Cc: bill.irwin@...cle.com, linux-kernel@...r.kernel.org,
gurudas.pai@...cle.com, Paul Jackson <pj@....com>
Subject: Re: [PATCH] Add nid sanity on alloc_pages_node
On Fri, 13 Jul 2007 16:03:36 +0800 Joe Jin <joe.jin@...cle.com> wrote:
> > >
> > > The patch looks good for this bug, thanks :)
> >
> > If you have time could you test it and sent it back at me please?
> >
>
> Test passed and panic gone.
Patch gone too ;) I deleted it. I was hoping that you'd send me the final
finished product (please).
> thanks.
>
> > > if other caller give a invalid nid to alloc_pages_node(), __alloc_pages
> > > will crash again.
> >
> > That would be a buggy caller, so we should fix that caller.
> >
> > > So I think we add some sanity check for nid at alloc_pages_node is
> > > meaningful.
> > >
> > > another question, if (nid >= MAX_NUMNODES), may I set nid to 0 directly
> > > like following code?
> > >
> > > if (unlikly(nid >= MAX_NUMNODES)
> > > nid = 0
> >
> > 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.
> >
> > if (nid == MAX_NUMNODES) then we should set it to
> > first_node(node_online_map);
>
> OK, will do it and send you a patch :)
Thanks. Please cc Paul Jackson <pj@....com> on that patch.
-
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