CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2026/05/28 14:31:57
Modified files:
usr.sbin/vmd : config.c
Log message:
vmd: Unbreak using images supplied with vmctl -b
My previous fix for reused filedescriptors broke using images
supplied with "vmctl -b": In that case, kernfd remained to be set
to -1, thus passing that filedescriptor to the child process failed.
To resolve this, dup vm->vm_kernel right before passing the descriptor
with proc_compose(). This fixes -b and the keeps original fix
working.
In the error path I rely on vm_stop()/vm_remove() closing vm->vm_kernel.
Therefore, remove the redundant close().
ok mlarkin@ deraadt@