HomeFreeBSD

bhyve: Remove init_snapshot() and initialize static vars

Description

bhyve: Remove init_snapshot() and initialize static vars

vCPU threads are starting before init_snapshot() is called. That can lead
to corruption of vcpu_lock userspace mutex (snapshot.c) and then VM hangs
in acquiring that mutex.

init_snapshot() initializes only static variables (mutex, cv) and that
code can be optimized and removed.

Fixes: 9a9a248964696 ("bhyve: init checkput before caph_enter")
Reviewed by: markj
MFC after: 1 week
Sponsored by: vStack

Details

Provenance
gusev.vitaliy_gmail.comAuthored on Oct 17 2023, 2:16 PM
markjCommitted on Oct 17 2023, 6:26 PM
Parents
rG2ee2890249ca: Makefile.inc1: remove ncurses/form from _prebuild_libs
Branches
Unknown
Tags
Unknown