diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/debug.c | 10 | ||||
-rw-r--r-- | mm/page_alloc.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/mm/debug.c b/mm/debug.c index 61b1f1bb328e..df7247b0b532 100644 --- a/mm/debug.c +++ b/mm/debug.c | |||
@@ -40,8 +40,7 @@ const struct trace_print_flags vmaflag_names[] = { | |||
40 | {0, NULL} | 40 | {0, NULL} |
41 | }; | 41 | }; |
42 | 42 | ||
43 | void dump_page_badflags(struct page *page, const char *reason, | 43 | void __dump_page(struct page *page, const char *reason) |
44 | unsigned long badflags) | ||
45 | { | 44 | { |
46 | pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#lx", | 45 | pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#lx", |
47 | page, atomic_read(&page->_count), page_mapcount(page), | 46 | page, atomic_read(&page->_count), page_mapcount(page), |
@@ -50,15 +49,12 @@ void dump_page_badflags(struct page *page, const char *reason, | |||
50 | pr_cont(" compound_mapcount: %d", compound_mapcount(page)); | 49 | pr_cont(" compound_mapcount: %d", compound_mapcount(page)); |
51 | pr_cont("\n"); | 50 | pr_cont("\n"); |
52 | BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS + 1); | 51 | BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS + 1); |
52 | |||
53 | pr_emerg("flags: %#lx(%pGp)\n", page->flags, &page->flags); | 53 | pr_emerg("flags: %#lx(%pGp)\n", page->flags, &page->flags); |
54 | 54 | ||
55 | if (reason) | 55 | if (reason) |
56 | pr_alert("page dumped because: %s\n", reason); | 56 | pr_alert("page dumped because: %s\n", reason); |
57 | 57 | ||
58 | badflags &= page->flags; | ||
59 | if (badflags) | ||
60 | pr_alert("bad because of flags: %#lx(%pGp)\n", badflags, | ||
61 | &badflags); | ||
62 | #ifdef CONFIG_MEMCG | 58 | #ifdef CONFIG_MEMCG |
63 | if (page->mem_cgroup) | 59 | if (page->mem_cgroup) |
64 | pr_alert("page->mem_cgroup:%p\n", page->mem_cgroup); | 60 | pr_alert("page->mem_cgroup:%p\n", page->mem_cgroup); |
@@ -67,7 +63,7 @@ void dump_page_badflags(struct page *page, const char *reason, | |||
67 | 63 | ||
68 | void dump_page(struct page *page, const char *reason) | 64 | void dump_page(struct page *page, const char *reason) |
69 | { | 65 | { |
70 | dump_page_badflags(page, reason, 0); | 66 | __dump_page(page, reason); |
71 | dump_page_owner(page); | 67 | dump_page_owner(page); |
72 | } | 68 | } |
73 | EXPORT_SYMBOL(dump_page); | 69 | EXPORT_SYMBOL(dump_page); |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d98672d33752..0691403aed93 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -430,7 +430,7 @@ static void bad_page(struct page *page, const char *reason, | |||
430 | goto out; | 430 | goto out; |
431 | } | 431 | } |
432 | if (nr_unshown) { | 432 | if (nr_unshown) { |
433 | printk(KERN_ALERT | 433 | pr_alert( |
434 | "BUG: Bad page state: %lu messages suppressed\n", | 434 | "BUG: Bad page state: %lu messages suppressed\n", |
435 | nr_unshown); | 435 | nr_unshown); |
436 | nr_unshown = 0; | 436 | nr_unshown = 0; |
@@ -440,9 +440,13 @@ static void bad_page(struct page *page, const char *reason, | |||
440 | if (nr_shown++ == 0) | 440 | if (nr_shown++ == 0) |
441 | resume = jiffies + 60 * HZ; | 441 | resume = jiffies + 60 * HZ; |
442 | 442 | ||
443 | printk(KERN_ALERT "BUG: Bad page state in process %s pfn:%05lx\n", | 443 | pr_alert("BUG: Bad page state in process %s pfn:%05lx\n", |
444 | current->comm, page_to_pfn(page)); | 444 | current->comm, page_to_pfn(page)); |
445 | dump_page_badflags(page, reason, bad_flags); | 445 | __dump_page(page, reason); |
446 | bad_flags &= page->flags; | ||
447 | if (bad_flags) | ||
448 | pr_alert("bad because of flags: %#lx(%pGp)\n", | ||
449 | bad_flags, &bad_flags); | ||
446 | dump_page_owner(page); | 450 | dump_page_owner(page); |
447 | 451 | ||
448 | print_modules(); | 452 | print_modules(); |