linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: Don't forget to set softdirty on file mapped fault
@ 2014-07-08 19:21 Cyrill Gorcunov
  2014-07-08 19:28 ` Pavel Emelyanov
  2014-07-08 20:19 ` Andrew Morton
  0 siblings, 2 replies; 8+ messages in thread
From: Cyrill Gorcunov @ 2014-07-08 19:21 UTC (permalink / raw)
  To: LKML, Linux MM; +Cc: Pavel Emelyanov, Andrew Morton

Otherwise we may not notice that pte was softdirty because pte_mksoft_dirty
helper _returns_ new pte but not modifies argument.

CC: Pavel Emelyanov <xemul@parallels.com>
CC: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 mm/memory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.git/mm/memory.c
===================================================================
--- linux-2.6.git.orig/mm/memory.c
+++ linux-2.6.git/mm/memory.c
@@ -2744,7 +2744,7 @@ void do_set_pte(struct vm_area_struct *v
 	if (write)
 		entry = maybe_mkwrite(pte_mkdirty(entry), vma);
 	else if (pte_file(*pte) && pte_file_soft_dirty(*pte))
-		pte_mksoft_dirty(entry);
+		entry = pte_mksoft_dirty(entry);
 	if (anon) {
 		inc_mm_counter_fast(vma->vm_mm, MM_ANONPAGES);
 		page_add_new_anon_rmap(page, vma, address);

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2014-07-08 21:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-08 19:21 [PATCH] mm: Don't forget to set softdirty on file mapped fault Cyrill Gorcunov
2014-07-08 19:28 ` Pavel Emelyanov
2014-07-08 20:19 ` Andrew Morton
2014-07-08 20:40   ` Cyrill Gorcunov
2014-07-08 20:45     ` Andrew Morton
2014-07-08 20:54       ` Cyrill Gorcunov
2014-07-08 21:05         ` Andrew Morton
2014-07-08 21:15           ` Cyrill Gorcunov

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