diff options
author | alc <alc@FreeBSD.org> | 2003-09-28 00:11:15 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-09-28 00:11:15 +0000 |
commit | 13a44c8d5af83073f39cf4d875c8e6a858323316 (patch) | |
tree | 48b8b772423b06a4c6f764b1ac8d7951716950c6 | |
parent | 4d437893acf3013d5a155cc5d793fb32ee5e02d5 (diff) | |
download | FreeBSD-src-13a44c8d5af83073f39cf4d875c8e6a858323316.zip FreeBSD-src-13a44c8d5af83073f39cf4d875c8e6a858323316.tar.gz |
Add vm object locking to pmap_release().
-rw-r--r-- | sys/sparc64/sparc64/pmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c index a861664..a1cbf99 100644 --- a/sys/sparc64/sparc64/pmap.c +++ b/sys/sparc64/sparc64/pmap.c @@ -1046,11 +1046,12 @@ pmap_release(pmap_t pm) CTR2(KTR_PMAP, "pmap_release: ctx=%#x tsb=%p", pm->pm_context[PCPU_GET(cpuid)], pm->pm_tsb); - obj = pm->pm_tsb_obj; - KASSERT(obj->ref_count == 1, ("pmap_release: tsbobj ref count != 1")); KASSERT(pmap_resident_count(pm) == 0, ("pmap_release: resident pages %ld != 0", pmap_resident_count(pm))); + obj = pm->pm_tsb_obj; + VM_OBJECT_LOCK(obj); + KASSERT(obj->ref_count == 1, ("pmap_release: tsbobj ref count != 1")); while (!TAILQ_EMPTY(&obj->memq)) { m = TAILQ_FIRST(&obj->memq); vm_page_lock_queues(); @@ -1065,6 +1066,7 @@ pmap_release(pmap_t pm) vm_page_free_zero(m); vm_page_unlock_queues(); } + VM_OBJECT_UNLOCK(obj); pmap_qremove((vm_offset_t)pm->pm_tsb, TSB_PAGES); } |