From ab28bd23125fb4a0411c3a3f01c4edacbc261486 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 9 Jul 2015 08:55:38 +0200 Subject: rcu: actually register threads that have RCU read-side critical sections Otherwise, grace periods are detected too early! Signed-off-by: Paolo Bonzini --- migration/migration.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'migration') diff --git a/migration/migration.c b/migration/migration.c index 86ca099ac4..fd4f99b84e 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -22,6 +22,7 @@ #include "block/block.h" #include "qapi/qmp/qerror.h" #include "qemu/sockets.h" +#include "qemu/rcu.h" #include "migration/block.h" #include "qemu/thread.h" #include "qmp-commands.h" @@ -917,6 +918,8 @@ static void *migration_thread(void *opaque) int64_t start_time = initial_time; bool old_vm_running = false; + rcu_register_thread(); + qemu_savevm_state_header(s->file); qemu_savevm_state_begin(s->file, &s->params); @@ -1016,6 +1019,7 @@ static void *migration_thread(void *opaque) qemu_bh_schedule(s->cleanup_bh); qemu_mutex_unlock_iothread(); + rcu_unregister_thread(); return NULL; } -- cgit v1.2.1