mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
In case pmap_extract_and_hold() is ever performed on a different pmap than
the current one, we need to pin the current thread to its CPU. Submitted by: tegge@
This commit is contained in:
parent
247aba2474
commit
df68e345c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131150
@ -878,12 +878,14 @@ pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot)
|
||||
vm_page_hold(m);
|
||||
}
|
||||
} else {
|
||||
sched_pin();
|
||||
pte = *pmap_pte_quick(pmap, va);
|
||||
if (pte != 0 &&
|
||||
((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) {
|
||||
m = PHYS_TO_VM_PAGE(pte & PG_FRAME);
|
||||
vm_page_hold(m);
|
||||
}
|
||||
sched_unpin();
|
||||
}
|
||||
}
|
||||
vm_page_unlock_queues();
|
||||
|
Loading…
Reference in New Issue
Block a user