Add pmap locking to pmap_protect().

This commit is contained in:
alc 2004-07-07 04:16:22 +00:00
parent fda3c26a4c
commit 2f7c054ae0

View File

@ -1686,6 +1686,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
if ((sva & PAGE_MASK) || (eva & PAGE_MASK)) if ((sva & PAGE_MASK) || (eva & PAGE_MASK))
panic("pmap_protect: unaligned addresses"); panic("pmap_protect: unaligned addresses");
PMAP_LOCK(pmap);
while (sva < eva) { while (sva < eva) {
/* /*
@ -1736,6 +1737,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
sva += PAGE_SIZE; sva += PAGE_SIZE;
} }
PMAP_UNLOCK(pmap);
} }
/* /*