mirror of
https://github.com/opnsense/src.git
synced 2026-03-24 11:43:11 -04:00
Utilize pmap_pte_quick() rather than pmap_pte() in pmap_protect(). The
reason being that pmap_pte_quick() requires the page queues lock, which is already held, rather than Giant.
This commit is contained in:
parent
1f7a1baa37
commit
aec86de47b
1 changed files with 3 additions and 1 deletions
|
|
@ -1805,6 +1805,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
|
|||
anychanged = 0;
|
||||
|
||||
vm_page_lock_queues();
|
||||
sched_pin();
|
||||
PMAP_LOCK(pmap);
|
||||
for (; sva < eva; sva = pdnxt) {
|
||||
unsigned pdirindex;
|
||||
|
|
@ -1839,7 +1840,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
|
|||
pt_entry_t *pte;
|
||||
vm_page_t m;
|
||||
|
||||
if ((pte = pmap_pte(pmap, sva)) == NULL)
|
||||
if ((pte = pmap_pte_quick(pmap, sva)) == NULL)
|
||||
continue;
|
||||
pbits = *pte;
|
||||
if (pbits & PG_MANAGED) {
|
||||
|
|
@ -1868,6 +1869,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
|
|||
}
|
||||
if (anychanged)
|
||||
pmap_invalidate_all(pmap);
|
||||
sched_unpin();
|
||||
vm_page_unlock_queues();
|
||||
PMAP_UNLOCK(pmap);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue