diff options
author | kib <kib@FreeBSD.org> | 2014-08-16 08:31:25 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-08-16 08:31:25 +0000 |
commit | aff71cbc8eb0cf61c63551637c7f3235ac564640 (patch) | |
tree | 8822f4ffcc287b93271d2a94721bcf68b8693d09 | |
parent | 6dbede78c2df75d760d6430abeb32a1e64d9d81a (diff) | |
download | FreeBSD-src-aff71cbc8eb0cf61c63551637c7f3235ac564640.zip FreeBSD-src-aff71cbc8eb0cf61c63551637c7f3235ac564640.tar.gz |
Complete r254667, do not destroy pmap lock if KVA allocation failed.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>
MFC after: 1 week
-rw-r--r-- | sys/i386/i386/pmap.c | 4 | ||||
-rw-r--r-- | sys/i386/xen/pmap.c | 1 | ||||
-rw-r--r-- | sys/sparc64/sparc64/pmap.c | 4 |
3 files changed, 2 insertions, 7 deletions
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 06d0ab8..2859b84 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -1755,10 +1755,8 @@ pmap_pinit(pmap_t pmap) */ if (pmap->pm_pdir == NULL) { pmap->pm_pdir = (pd_entry_t *)kva_alloc(NBPTD); - if (pmap->pm_pdir == NULL) { - PMAP_LOCK_DESTROY(pmap); + if (pmap->pm_pdir == NULL) return (0); - } #ifdef PAE pmap->pm_pdpt = uma_zalloc(pdptzone, M_WAITOK | M_ZERO); KASSERT(((vm_offset_t)pmap->pm_pdpt & diff --git a/sys/i386/xen/pmap.c b/sys/i386/xen/pmap.c index 3cc8937..2f7f027 100644 --- a/sys/i386/xen/pmap.c +++ b/sys/i386/xen/pmap.c @@ -1459,7 +1459,6 @@ pmap_pinit(pmap_t pmap) if (pmap->pm_pdir == NULL) { pmap->pm_pdir = (pd_entry_t *)kva_alloc(NBPTD); if (pmap->pm_pdir == NULL) { - PMAP_LOCK_DESTROY(pmap); #ifdef HAMFISTED_LOCKING mtx_unlock(&createdelete_lock); #endif diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c index b056a70..f10678e 100644 --- a/sys/sparc64/sparc64/pmap.c +++ b/sys/sparc64/sparc64/pmap.c @@ -1211,11 +1211,9 @@ pmap_pinit(pmap_t pm) */ if (pm->pm_tsb == NULL) { pm->pm_tsb = (struct tte *)kva_alloc(TSB_BSIZE); - if (pm->pm_tsb == NULL) { - PMAP_LOCK_DESTROY(pm); + if (pm->pm_tsb == NULL) return (0); } - } /* * Allocate an object for it. |