Skip to contentSkip to conversation

fix segfault on fd-migration starting

PATCH In review Wen Congyang 2 participants 2 messages Nov 7, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix segfault on fd-migration starting

We set s->mon to NULL in migrate_init. But we will use it to search fd when do fd-migration, and it will cause qemu crashed.

---
 migration.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
migration.c +1 -1
index 4b17566..d094381 100644
@@ -383,7 +383,7 @@ static MigrationState *migrate_init(Monitor *mon, int detach, int blk, int inc)
     s->bandwidth_limit = bandwidth_limit;
     s->blk = blk;
     s->shared = inc;
-    s->mon = NULL;
+    s->mon = mon;
     s->bandwidth_limit = bandwidth_limit;
     s->state = MIG_STATE_SETUP;
 
Signature · 1 line
1.7.1
#1 lore raw
Quoted 15 lines · Wen Congyang

We set s->mon to NULL in migrate_init. But we will use it to search fd when do fd-migration, and it will cause qemu crashed.

---
 migration.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
migration.c +0 -0
index 4b17566..d094381 100644

migration.c static MigrationState *migrate_init(Monitor *mon, int detach, int blk, int inc) · line 388

Quoted 7 lines
migration.c +1 -1
@@ -383,7 +383,7 @@ static MigrationState *migrate_init(Monitor *mon, int detach, int blk, int inc)
     s->bandwidth_limit = bandwidth_limit;
     s->blk = blk;
     s->shared = inc;
-    s->mon = NULL;
+    s->mon = mon;
     s->bandwidth_limit = bandwidth_limit;
     s->state = MIG_STATE_SETUP;

Problem is real.
Patch is wrong, because now we "resume" the monitor even when we are doing detached migration. Looking into it.

Thanks, Juan.