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 <[email protected]>
> 
> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to