mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
Acquire the source pmap's lock in pmap_copy().
This commit is contained in:
parent
69bc96f231
commit
ab42aa145d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141370
@ -1475,7 +1475,13 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr,
|
||||
if (dst_addr != src_addr)
|
||||
return;
|
||||
vm_page_lock_queues();
|
||||
PMAP_LOCK(dst_pmap);
|
||||
if (dst_pmap < src_pmap) {
|
||||
PMAP_LOCK(dst_pmap);
|
||||
PMAP_LOCK(src_pmap);
|
||||
} else {
|
||||
PMAP_LOCK(src_pmap);
|
||||
PMAP_LOCK(dst_pmap);
|
||||
}
|
||||
if (len > PMAP_TSB_THRESH) {
|
||||
tsb_foreach(src_pmap, dst_pmap, src_addr, src_addr + len,
|
||||
pmap_copy_tte);
|
||||
@ -1488,6 +1494,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr,
|
||||
tlb_range_demap(dst_pmap, src_addr, src_addr + len - 1);
|
||||
}
|
||||
vm_page_unlock_queues();
|
||||
PMAP_UNLOCK(src_pmap);
|
||||
PMAP_UNLOCK(dst_pmap);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user