Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Mar 2012 01:26:00 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r233530 - head/sys/powerpc/aim
Message-ID:  <201203270126.q2R1Q0DW058525@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Tue Mar 27 01:26:00 2012
New Revision: 233530
URL: http://svn.freebsd.org/changeset/base/233530

Log:
  Make sure to call vm_page_dirty() before the pmap lock is released to
  prevent a race where another process could conclude the page was clean.
  
  Submitted by:	alc

Modified:
  head/sys/powerpc/aim/mmu_oea64.c

Modified: head/sys/powerpc/aim/mmu_oea64.c
==============================================================================
--- head/sys/powerpc/aim/mmu_oea64.c	Tue Mar 27 01:24:18 2012	(r233529)
+++ head/sys/powerpc/aim/mmu_oea64.c	Tue Mar 27 01:26:00 2012	(r233530)
@@ -1582,11 +1582,11 @@ moea64_remove_write(mmu_t mmu, vm_page_t
 					isync();
 			}
 		}
+		if ((lo & LPTE_CHG) != 0) 
+			vm_page_dirty(m);
 		PMAP_UNLOCK(pmap);
 	}
 	UNLOCK_TABLE_RD();
-	if ((lo & LPTE_CHG) != 0) 
-		vm_page_dirty(m);
 	vm_page_aflag_clear(m, PGA_WRITEABLE);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203270126.q2R1Q0DW058525>