diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-11-08 04:45:33 -0500 |
---|---|---|
committer | James Hogan <james.hogan@imgtec.com> | 2013-11-08 06:23:00 -0500 |
commit | 51387306b5c2b0c9eb1e2556de1b37267bb2b583 (patch) | |
tree | 45e2ae361cd4b2006a8110351e9ce54f40a2cd20 /arch/metag | |
parent | 95281171a713f4d32f1a044b937563ec7776ccfe (diff) |
metag: off by one in setup_bootmem_node()
If "nid == MAX_NUMNODES" then we write beyond the end of the node_data[]
array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Diffstat (limited to 'arch/metag')
-rw-r--r-- | arch/metag/mm/numa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/metag/mm/numa.c b/arch/metag/mm/numa.c index 9ae578c9b620..b172aa45fcf8 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) | |||
34 | unsigned long pgdat_paddr; | 34 | unsigned long pgdat_paddr; |
35 | 35 | ||
36 | /* Don't allow bogus node assignment */ | 36 | /* Don't allow bogus node assignment */ |
37 | BUG_ON(nid > MAX_NUMNODES || nid <= 0); | 37 | BUG_ON(nid >= MAX_NUMNODES || nid <= 0); |
38 | 38 | ||
39 | start_pfn = start >> PAGE_SHIFT; | 39 | start_pfn = start >> PAGE_SHIFT; |
40 | end_pfn = end >> PAGE_SHIFT; | 40 | end_pfn = end >> PAGE_SHIFT; |