aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/vmm/vmm_mem.h
diff options
context:
space:
mode:
authorRobert Wing <rew@FreeBSD.org>2023-01-20 11:10:53 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2023-01-26 22:05:23 +0000
commit8cd6af3324bfb563a64d34b581e88efa46db6ac5 (patch)
treead53507fd51479f5d4bb01044312b8474364e4f7 /sys/amd64/vmm/vmm_mem.h
parenteb37d3cc565e278d568b0454fc3b2b9cab4c3518 (diff)
vmm: take exclusive mem_segs_lock in vm_cleanup()
The consumers of vm_cleanup() are vm_reinit() and vm_destroy(). The vm_reinit() call path is, here vmmdev_ioctl() takes mem_segs_lock: vmmdev_ioctl() vm_reinit() vm_cleanup(destroy=false) The call path for vm_destroy() is (mem_segs_lock not taken): sysctl_vmm_destroy() vmmdev_destroy() vm_destroy() vm_cleanup(destroy=true) Fix this by taking mem_segs_lock in vm_cleanup() when destroy == true. Reviewed by: corvink, markj, jhb Fixes: 67b69e76e8ee ("vmm: Use an sx lock to protect the memory map.") Differential Revision: https://reviews.freebsd.org/D38071 (cherry picked from commit c668e8173a8fc047b54a5c51b0fe4637e87836b6)
Diffstat (limited to 'sys/amd64/vmm/vmm_mem.h')
0 files changed, 0 insertions, 0 deletions