The patch titled Subject: sh: off by one BUG_ON() in setup_bootmem_node() has been added to the -mm tree. Its filename is sh-off-by-one-bug_on-in-setup_bootmem_node.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/sh-off-by-one-bug_on-in-setup_bootmem_node.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/sh-off-by-one-bug_on-in-setup_bootmem_node.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Subject: sh: off by one BUG_ON() in setup_bootmem_node() This off by one bug is harmless but it upsets the static checkers and the code is obvious so it doesn't hurt to fix it. The Smatch warning is: arch/sh/mm/numa.c:47 setup_bootmem_node() error: buffer overflow 'node_data' 1024 <= 1024 Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Cc: Paul Mundt <lethal@xxxxxxxxxxxx> Acked-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/sh/mm/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN arch/sh/mm/numa.c~sh-off-by-one-bug_on-in-setup_bootmem_node arch/sh/mm/numa.c --- a/arch/sh/mm/numa.c~sh-off-by-one-bug_on-in-setup_bootmem_node +++ a/arch/sh/mm/numa.c @@ -31,7 +31,7 @@ void __init setup_bootmem_node(int nid, unsigned long bootmem_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; _ Patches currently in -mm which might be from dan.carpenter@xxxxxxxxxx are sh-off-by-one-bug_on-in-setup_bootmem_node.patch ocfs2-fix-an-off-by-one-bug_on-statement.patch ocfs2-remove-bogus-null-check-in-ocfs2_move_extents.patch ocfs2-remove-unneeded-null-check.patch exit-reparent-cleanup-the-changing-of-parent-fix.patch checkpatch-add-strict-pointer-comparison-to-null-test.patch checkpatch-add-ability-to-fix-coalesce-string-fragments-on-multiple-lines.patch rtc-pcf8563-remove-leftover-code.patch rtc-pcf8563-fix-write-of-invalid-bits-to-st2-reg.patch rtc-pcf8563-fix-wrong-time-from-read_alarm.patch rtc-pcf8563-handle-consequeces-of-lacking-second-alarm-reg.patch rtc-pcf8563-save-battery-power.patch rtc-pcf8563-clear-expired-alarm-at-boot-time.patch decompress_bunzip2-off-by-one-in-get_next_block.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html