vmm: protect vmm activation with the vmm_softc rwlock.
authordv <dv@openbsd.org>
Sat, 13 Apr 2024 21:57:22 +0000 (21:57 +0000)
committerdv <dv@openbsd.org>
Sat, 13 Apr 2024 21:57:22 +0000 (21:57 +0000)
commitddfb6951b46906d16bfa982bb8e746426dcc2914
tree30fdca623844914c242dc4ec9f4539b4a1bc9f47
parent38100d85fbfe7fb3efed4f57fdcf9283c9a3ecc0
vmm: protect vmm activation with the vmm_softc rwlock.

Syzbot found a race when enabling vmm mode on multiprocessor systems.

Protect the vmm start/stop lifecycle by taking the write lock used
for protecting the status of the vmm device.

Reported-by: syzbot+6ae9cec00bbe45fd7782@syzkaller.appspotmail.com
ok gnezdo@
sys/arch/amd64/amd64/vmm_machdep.c