svn commit: r233530 - head/sys/powerpc/aim

Nathan Whitehorn nwhitehorn at FreeBSD.org
Tue Mar 27 01:26:01 UTC 2012


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);
 }
 


More information about the svn-src-all mailing list