Commit d321a42d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] rmap 30 fix bad mapcount

From: Hugh Dickins <hugh@veritas.com>

From: Andrea Arcangeli <andrea@suse.de>

page_alloc.c's bad_page routine should reset a bad mapcount; and it's more
revealing to show the bad mapcount than just the boolean mapped.
parent c3a17613
......@@ -73,9 +73,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 mapped:%d count:%d\n",
printk(KERN_EMERG "flags:0x%08lx mapping:%p mapcount:%d count:%d\n",
(unsigned long)page->flags, page->mapping,
page_mapped(page), page_count(page));
(int)page->mapcount, page_count(page));
printk(KERN_EMERG "Backtrace:\n");
dump_stack();
printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n");
......@@ -90,6 +90,7 @@ static void bad_page(const char *function, struct page *page)
1 << PG_writeback);
set_page_count(page, 0);
page->mapping = NULL;
page->mapcount = 0;
}
#ifndef CONFIG_HUGETLB_PAGE
......
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