aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorWilliam Lee Irwin III <wli@holomorphy.com>2004-09-02 20:29:04 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-02 20:29:04 -0700
commit6264daec8d1c066b8876cb8d8724a041b92fa151 (patch)
tree94c1b5b319e162adcb812d0f84e0efdf6c123039 /mm
parente91b5c70e36725f13b2a0b522551bf036ce85b0f (diff)
downloadhistory-6264daec8d1c066b8876cb8d8724a041b92fa151.tar.gz
[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 <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 327f35787fe26d..f2b5f575a4105f 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");