Commit 263399c6 authored by Rik van Riel's avatar Rik van Riel Committed by Trond Myklebust

[PATCH] urgent rmap bugfix

It turns out there was a subtle bug in Craig Kulesa's port of
the rmap patch to 2.5, which is only apparent on non-x86 machines
where pfn 0 isn't valid.

The problem was that zap_pte_range() would clear the pte before
page_remove_rmap() would get called. This means that on these
machines the pte chain would never be removed and the machine
would oops at page_alloc.c line 98...

Thanks to Russell King for helping track down this bug.
parent de77864d
......@@ -163,7 +163,7 @@ void page_add_rmap(struct page * page, pte_t * ptep)
void page_remove_rmap(struct page * page, pte_t * ptep)
{
struct pte_chain * pc, * prev_pc = NULL;
unsigned long pfn = pte_pfn(*ptep);
unsigned long pfn = page_to_pfn(page);
if (!page || !ptep)
BUG();
......
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