svn commit: r270151 - head/sys/amd64/amd64
Alan Cox
alc at FreeBSD.org
Mon Aug 18 20:28:09 UTC 2014
Author: alc
Date: Mon Aug 18 20:28:08 2014
New Revision: 270151
URL: http://svnweb.freebsd.org/changeset/base/270151
Log:
There exists a possible sequence of page table page allocation failures
starting with a superpage demotion by pmap_enter() that could result in
a PV list lock being held when pmap_enter() is just about to return
KERN_RESOURCE_SHORTAGE. Consequently, the KASSERT that no PV list locks
are held needs to be replaced with a conditional unlock.
Discussed with: kib
X-MFC with: r269728
Sponsored by: EMC / Isilon Storage Division
Modified:
head/sys/amd64/amd64/pmap.c
Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c Mon Aug 18 20:21:12 2014 (r270150)
+++ head/sys/amd64/amd64/pmap.c Mon Aug 18 20:28:08 2014 (r270151)
@@ -4201,9 +4201,10 @@ retry:
mpte = _pmap_allocpte(pmap, pmap_pde_pindex(va),
nosleep ? NULL : &lock);
if (mpte == NULL && nosleep) {
- KASSERT(lock == NULL, ("lock leaked for nosleep"));
- PMAP_UNLOCK(pmap);
+ if (lock != NULL)
+ rw_wunlock(lock);
rw_runlock(&pvh_global_lock);
+ PMAP_UNLOCK(pmap);
return (KERN_RESOURCE_SHORTAGE);
}
goto retry;
More information about the svn-src-head
mailing list