diff options
author | Hugh Dickins <hugh@veritas.com> | 2009-01-06 17:40:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 18:59:08 -0500 |
commit | 1e9e63650d6cb88e6d6d2ca6cc3ee276c26de4a3 (patch) | |
tree | 2fd95051128ef2ebfaad421ee919dab9e25459b2 | |
parent | d936cf9b39b06c8d2e0d7fb5e7b4f176e18dec69 (diff) |
badpage: KERN_ALERT BUG instead of KERN_EMERG
bad_page() and rmap Eeek messages have said KERN_EMERG for a few years,
which I've followed in print_bad_pte(). These are serious system errors,
on a par with BUGs, but they're not quite emergencies, and we do our best
to carry on: say KERN_ALERT "BUG: " like the x86 oops does.
And remove the "Trying to fix it up, but a reboot is needed" line: it's
not untrue, but I hope the KERN_ALERT "BUG: " conveys as much.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/memory.c | 15 | ||||
-rw-r--r-- | mm/page_alloc.c | 9 |
2 files changed, 12 insertions, 12 deletions
diff --git a/mm/memory.c b/mm/memory.c index b12888c1b4e3..db68af8e0bc4 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -397,8 +397,8 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr, | |||
397 | return; | 397 | return; |
398 | } | 398 | } |
399 | if (nr_unshown) { | 399 | if (nr_unshown) { |
400 | printk(KERN_EMERG | 400 | printk(KERN_ALERT |
401 | "Bad page map: %lu messages suppressed\n", | 401 | "BUG: Bad page map: %lu messages suppressed\n", |
402 | nr_unshown); | 402 | nr_unshown); |
403 | nr_unshown = 0; | 403 | nr_unshown = 0; |
404 | } | 404 | } |
@@ -410,26 +410,27 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr, | |||
410 | mapping = vma->vm_file ? vma->vm_file->f_mapping : NULL; | 410 | mapping = vma->vm_file ? vma->vm_file->f_mapping : NULL; |
411 | index = linear_page_index(vma, addr); | 411 | index = linear_page_index(vma, addr); |
412 | 412 | ||
413 | printk(KERN_EMERG "Bad page map in process %s pte:%08llx pmd:%08llx\n", | 413 | printk(KERN_ALERT |
414 | "BUG: Bad page map in process %s pte:%08llx pmd:%08llx\n", | ||
414 | current->comm, | 415 | current->comm, |
415 | (long long)pte_val(pte), (long long)pmd_val(*pmd)); | 416 | (long long)pte_val(pte), (long long)pmd_val(*pmd)); |
416 | if (page) { | 417 | if (page) { |
417 | printk(KERN_EMERG | 418 | printk(KERN_ALERT |
418 | "page:%p flags:%p count:%d mapcount:%d mapping:%p index:%lx\n", | 419 | "page:%p flags:%p count:%d mapcount:%d mapping:%p index:%lx\n", |
419 | page, (void *)page->flags, page_count(page), | 420 | page, (void *)page->flags, page_count(page), |
420 | page_mapcount(page), page->mapping, page->index); | 421 | page_mapcount(page), page->mapping, page->index); |
421 | } | 422 | } |
422 | printk(KERN_EMERG | 423 | printk(KERN_ALERT |
423 | "addr:%p vm_flags:%08lx anon_vma:%p mapping:%p index:%lx\n", | 424 | "addr:%p vm_flags:%08lx anon_vma:%p mapping:%p index:%lx\n", |
424 | (void *)addr, vma->vm_flags, vma->anon_vma, mapping, index); | 425 | (void *)addr, vma->vm_flags, vma->anon_vma, mapping, index); |
425 | /* | 426 | /* |
426 | * Choose text because data symbols depend on CONFIG_KALLSYMS_ALL=y | 427 | * Choose text because data symbols depend on CONFIG_KALLSYMS_ALL=y |
427 | */ | 428 | */ |
428 | if (vma->vm_ops) | 429 | if (vma->vm_ops) |
429 | print_symbol(KERN_EMERG "vma->vm_ops->fault: %s\n", | 430 | print_symbol(KERN_ALERT "vma->vm_ops->fault: %s\n", |
430 | (unsigned long)vma->vm_ops->fault); | 431 | (unsigned long)vma->vm_ops->fault); |
431 | if (vma->vm_file && vma->vm_file->f_op) | 432 | if (vma->vm_file && vma->vm_file->f_op) |
432 | print_symbol(KERN_EMERG "vma->vm_file->f_op->mmap: %s\n", | 433 | print_symbol(KERN_ALERT "vma->vm_file->f_op->mmap: %s\n", |
433 | (unsigned long)vma->vm_file->f_op->mmap); | 434 | (unsigned long)vma->vm_file->f_op->mmap); |
434 | dump_stack(); | 435 | dump_stack(); |
435 | add_taint(TAINT_BAD_PAGE); | 436 | add_taint(TAINT_BAD_PAGE); |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d1a80f652c6f..d531e8ef9984 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -237,8 +237,8 @@ static void bad_page(struct page *page) | |||
237 | goto out; | 237 | goto out; |
238 | } | 238 | } |
239 | if (nr_unshown) { | 239 | if (nr_unshown) { |
240 | printk(KERN_EMERG | 240 | printk(KERN_ALERT |
241 | "Bad page state: %lu messages suppressed\n", | 241 | "BUG: Bad page state: %lu messages suppressed\n", |
242 | nr_unshown); | 242 | nr_unshown); |
243 | nr_unshown = 0; | 243 | nr_unshown = 0; |
244 | } | 244 | } |
@@ -247,13 +247,12 @@ static void bad_page(struct page *page) | |||
247 | if (nr_shown++ == 0) | 247 | if (nr_shown++ == 0) |
248 | resume = jiffies + 60 * HZ; | 248 | resume = jiffies + 60 * HZ; |
249 | 249 | ||
250 | printk(KERN_EMERG "Bad page state in process %s pfn:%05lx\n", | 250 | printk(KERN_ALERT "BUG: Bad page state in process %s pfn:%05lx\n", |
251 | current->comm, page_to_pfn(page)); | 251 | current->comm, page_to_pfn(page)); |
252 | printk(KERN_EMERG | 252 | printk(KERN_ALERT |
253 | "page:%p flags:%p count:%d mapcount:%d mapping:%p index:%lx\n", | 253 | "page:%p flags:%p count:%d mapcount:%d mapping:%p index:%lx\n", |
254 | page, (void *)page->flags, page_count(page), | 254 | page, (void *)page->flags, page_count(page), |
255 | page_mapcount(page), page->mapping, page->index); | 255 | page_mapcount(page), page->mapping, page->index); |
256 | printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n"); | ||
257 | 256 | ||
258 | dump_stack(); | 257 | dump_stack(); |
259 | out: | 258 | out: |