Migration is only supported in vhost user mode. But, we need to initialise c->device_state_fd to -1 even in modes without migration so that migrate_handler() knows it doesn't have anything to do. Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au> --- migrate.c | 1 - passt.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/migrate.c b/migrate.c index 669016e1..b5d87547 100644 --- a/migrate.c +++ b/migrate.c @@ -156,7 +156,6 @@ static int migrate_target(struct ctx *c, int fd) */ void migrate_init(struct ctx *c) { - c->device_state_fd = -1; c->device_state_result = -1; } diff --git a/passt.c b/passt.c index fc93a765..935a69f1 100644 --- a/passt.c +++ b/passt.c @@ -202,6 +202,7 @@ int main(int argc, char **argv) isolate_initial(argc, argv); c.pasta_netns_fd = c.fd_tap = c.pidfile_fd = -1; + c.device_state_fd = -1; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; -- 2.48.1