aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
Diffstat (limited to 'migration')
-rw-r--r--migration/block.c2
-rw-r--r--migration/migration-hmp-cmds.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/migration/block.c b/migration/block.c
index 5f930870a5..d115e1cfa5 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -388,6 +388,8 @@ static int init_blk_migration(QEMUFile *f)
Error *local_err = NULL;
int ret;
+ GRAPH_RDLOCK_GUARD_MAINLOOP();
+
block_mig_state.submitted = 0;
block_mig_state.read_done = 0;
block_mig_state.transferred = 0;
diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c
index c115ef2d23..5b25ba24f7 100644
--- a/migration/migration-hmp-cmds.c
+++ b/migration/migration-hmp-cmds.c
@@ -794,6 +794,8 @@ static void vm_completion(ReadLineState *rs, const char *str)
BlockDriverState *bs;
BdrvNextIterator it;
+ GRAPH_RDLOCK_GUARD_MAINLOOP();
+
len = strlen(str);
readline_set_completion_index(rs, len);