From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Hogan Subject: Re: [patch] metag: off by one in setup_bootmem_node() Date: Fri, 8 Nov 2013 11:33:37 +0000 Message-ID: <527CCC11.9000709@imgtec.com> References: <20131108094533.GD27977@elgon.mountain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20131108094533.GD27977-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org> Sender: linux-metag-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Dan Carpenter Cc: linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On 08/11/13 09:45, Dan Carpenter wrote: > If "nid == MAX_NUMNODES" then we write beyond the end of the node_data[] > array. > > Signed-off-by: Dan Carpenter > > diff --git a/arch/metag/mm/numa.c b/arch/metag/mm/numa.c > index 9ae578c..b172aa4 100644 > --- a/arch/metag/mm/numa.c > +++ b/arch/metag/mm/numa.c > @@ -34,7 +34,7 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end) > unsigned long pgdat_paddr; > > /* Don't allow bogus node assignment */ > - BUG_ON(nid > MAX_NUMNODES || nid <= 0); > + BUG_ON(nid >= MAX_NUMNODES || nid <= 0); > > start_pfn = start >> PAGE_SHIFT; > end_pfn = end >> PAGE_SHIFT; Thanks, Applied for v3.13. Cheers James -- To unsubscribe from this list: send the line "unsubscribe linux-metag" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html