Commit 6264daec authored by William Lee Irwin III's avatar William Lee Irwin III Committed by Linus Torvalds

[PATCH] make bad_page() print all of page->flags

bad_page() only prints out 8 hexadecimal digits of page->flags regardless
of sizeof(page_flags_t).  This leads to confusing and/or incomplete bug
reports.  The following patch uses a field width argument to replace the
hardcoded %08lx so that bad_page() may print the whole of page->flags.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e91b5c70
...@@ -76,9 +76,9 @@ static void bad_page(const char *function, struct page *page) ...@@ -76,9 +76,9 @@ static void bad_page(const char *function, struct page *page)
{ {
printk(KERN_EMERG "Bad page state at %s (in process '%s', page %p)\n", printk(KERN_EMERG "Bad page state at %s (in process '%s', page %p)\n",
function, current->comm, page); function, current->comm, page);
printk(KERN_EMERG "flags:0x%08lx mapping:%p mapcount:%d count:%d\n", printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n",
(unsigned long)page->flags, page->mapping, (int)(2*sizeof(page_flags_t)), (unsigned long)page->flags,
page_mapcount(page), page_count(page)); page->mapping, page_mapcount(page), page_count(page));
printk(KERN_EMERG "Backtrace:\n"); printk(KERN_EMERG "Backtrace:\n");
dump_stack(); dump_stack();
printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n"); printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment