linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] urgent rmap bugfix
@ 2002-07-23 17:07 Rik van Riel
  0 siblings, 0 replies; only message in thread
From: Rik van Riel @ 2002-07-23 17:07 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, linux-kernel, rmk, linux-mm, Craig Kulesa

Hi,

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.

please apply,

Rik
-- 
Bravely reimplemented by the knights who say "NIH".

===== mm/rmap.c 1.3 vs edited =====
--- 1.3/mm/rmap.c	Tue Jul 16 18:46:30 2002
+++ edited/mm/rmap.c	Tue Jul 23 14:01:23 2002
@@ -163,7 +163,7 @@
 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();


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-07-23 17:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-23 17:07 [PATCH] urgent rmap bugfix Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox