Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=12710a56cb56e81bd8f457cc2f50c2ebfc0cb390
Commit:     12710a56cb56e81bd8f457cc2f50c2ebfc0cb390
Parent:     778e9a9c3e7193ea9f434f382947155ffb59c755
Author:     Bob Picco <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 8 13:47:00 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Jun 8 17:23:34 2007 -0700

    fix sysrq-m oops
    
    We aren't sampling for holes in memory.  Thus we encounter a section hole
    with empty section map pointer for SPARSEMEM and OOPs for show_mem.  This
    issue has been seen in 2.6.21, current git and current mm.  The patch below
    is for mainline and mm.  It was boot tested for SPARSEMEM, current VMEMMAP
    of Andy's in mm ml and DISCONTIGMEM.  A slightly different patch will be
    posted to stable for 2.6.21.
    
    Previous to commit f0a5a58aa812b31fd9f197c4ba48245942364eae memory_present
    was called for node_start_pfn to node_end_pfn.  This would cover the
    hole(s) with reserved pages and valid sections.  Most SPARSEMEM supported
    arches do a pfn_valid check in show_mem before computing the page structure
    address.
    
    This issue was brought to my attention on IRC by Arnaldo Carvalho de Melo.
    Thanks to Arnaldo for testing.
    
    Signed-off-by: Bob Picco <[EMAIL PROTECTED]>
    Cc: Chuck Ebbert <[EMAIL PROTECTED]>
    Cc: Andi Kleen <[EMAIL PROTECTED]>
    Cc: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
    Acked-by: Andy Whitcroft <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/x86_64/mm/init.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index 1ad5111..efb6e84 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -79,6 +79,8 @@ void show_mem(void)
                        if (unlikely(i % MAX_ORDER_NR_PAGES == 0)) {
                                touch_nmi_watchdog();
                        }
+                       if (!pfn_valid(pgdat->node_start_pfn + i))
+                               continue;
                        page = pfn_to_page(pgdat->node_start_pfn + i);
                        total++;
                        if (PageReserved(page))
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to