From 6264daec8d1c066b8876cb8d8724a041b92fa151 Mon Sep 17 00:00:00 2001 From: William Lee Irwin III Date: Thu, 2 Sep 2004 20:29:04 -0700 Subject: [PATCH] [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: Andrew Morton Signed-off-by: Linus Torvalds --- mm/page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 327f35787fe26..f2b5f575a4105 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -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", function, current->comm, page); - printk(KERN_EMERG "flags:0x%08lx mapping:%p mapcount:%d count:%d\n", - (unsigned long)page->flags, page->mapping, - page_mapcount(page), page_count(page)); + printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n", + (int)(2*sizeof(page_flags_t)), (unsigned long)page->flags, + page->mapping, page_mapcount(page), page_count(page)); printk(KERN_EMERG "Backtrace:\n"); dump_stack(); printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n"); -- 2.53.0