mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
bhyve: init checkput before caph_enter
init_checkpoint_thread binds to a socket. Bhyve isn't allowed to do that
after caph_enter.
Reviewed by: corvink, markj
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D38857
(cherry picked from commit 9a9a248964
)
This commit is contained in:
parent
6efb053bea
commit
c8ec366fd7
|
@ -1562,6 +1562,17 @@ main(int argc, char *argv[])
|
|||
*/
|
||||
setproctitle("%s", vmname);
|
||||
|
||||
#ifdef BHYVE_SNAPSHOT
|
||||
/* initialize mutex/cond variables */
|
||||
init_snapshot();
|
||||
|
||||
/*
|
||||
* checkpointing thread for communication with bhyvectl
|
||||
*/
|
||||
if (init_checkpoint_thread(ctx) != 0)
|
||||
errx(EX_OSERR, "Failed to start checkpoint thread");
|
||||
#endif
|
||||
|
||||
#ifndef WITHOUT_CAPSICUM
|
||||
caph_cache_catpages();
|
||||
|
||||
|
@ -1573,15 +1584,6 @@ main(int argc, char *argv[])
|
|||
#endif
|
||||
|
||||
#ifdef BHYVE_SNAPSHOT
|
||||
/* initialize mutex/cond variables */
|
||||
init_snapshot();
|
||||
|
||||
/*
|
||||
* checkpointing thread for communication with bhyvectl
|
||||
*/
|
||||
if (init_checkpoint_thread(ctx) != 0)
|
||||
errx(EX_OSERR, "Failed to start checkpoint thread");
|
||||
|
||||
if (restore_file != NULL) {
|
||||
destroy_restore_state(&rstate);
|
||||
if (vm_restore_time(ctx) < 0)
|
||||
|
|
Loading…
Reference in a new issue