public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] flush_cache_page while pte valid
@ 2002-11-11 18:25 Hugh Dickins
  2002-11-11 18:35 ` Andrew Morton
  2002-11-11 23:19 ` David S. Miller
  0 siblings, 2 replies; 29+ messages in thread
From: Hugh Dickins @ 2002-11-11 18:25 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Dave McCracken, Rik van Riel, David S. Miller, linux-kernel

On some architectures (cachetlb.txt gives HyperSparc as an example)
it is essential to flush_cache_page while pte is still valid: the
rmap VM diverged from the base 2.4 VM before that fix was made,
so this error has crept back into 2.5.

Patch below applies to 2.5.47 or 2.5.47-mm1 - needs more work over
shared pagetables, but they've silently fallen out of 2.5.47-mm1:
oversight?  I'll send Alan the equivalent for 2.4-ac shortly.

(I wonder, what happens if userspace now modifies the page
after the flush_cache_page, before the pte is invalidated?)

--- 2.5.47/mm/rmap.c	Mon Oct  7 20:37:50 2002
+++ linux/mm/rmap.c	Mon Nov 11 17:01:27 2002
@@ -393,9 +393,9 @@
 	}
 
 	/* Nuke the page table entry. */
+	flush_cache_page(vma, address);
 	pte = ptep_get_and_clear(ptep);
 	flush_tlb_page(vma, address);
-	flush_cache_page(vma, address);
 
 	/* Store the swap location in the pte. See handle_pte_fault() ... */
 	if (PageSwapCache(page)) {


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2003-01-07  8:58 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-11 18:25 [PATCH] flush_cache_page while pte valid Hugh Dickins
2002-11-11 18:35 ` Andrew Morton
2002-11-11 23:19 ` David S. Miller
2002-11-11 23:34   ` [PATCH] [RFC] increase MAX_ADDR_LEN Roland Dreier
2002-11-11 23:38     ` David S. Miller
2002-11-11 23:58       ` Roland Dreier
2002-11-12  0:18       ` Alan Cox
2002-11-12  0:01         ` Roland Dreier
2002-11-12 14:23           ` Alan Cox
2002-11-12 14:20             ` Folkert van Heusden
2002-11-12 15:14             ` Roland Dreier
2002-11-12 16:00               ` Alan Cox
2002-11-12 15:50                 ` YOSHIFUJI Hideaki / 吉藤英明
2002-11-12 20:36                 ` Roland Dreier
2002-11-12 22:31                   ` David S. Miller
2002-11-12 22:39                     ` Roland Dreier
2002-12-04 18:31                     ` rtnetlink replacement for SIOCSIFHWADDR Roland Dreier
2002-12-04 20:11                       ` Andi Kleen
2002-12-31 23:11                         ` [PATCH] increase MAX_ADDR_LEN Roland Dreier
2003-01-06 15:52                           ` [PATCH] increase MAX_ADDR_LEN (resend) Roland Dreier
2003-01-06 23:29                             ` David S. Miller
2003-01-07  8:58                           ` [PATCH] increase MAX_ADDR_LEN David S. Miller
2002-11-12  6:53   ` [PATCH] flush_cache_page while pte valid Hugh Dickins
2002-11-12  6:53     ` David S. Miller
2002-11-12 14:49       ` Rik van Riel
2002-11-12 21:45         ` David S. Miller
2002-11-12 17:43       ` Hugh Dickins
2002-11-12 21:51         ` David S. Miller
2002-11-12 22:59           ` Hugh Dickins

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