migration: fix RCU deadlock

migration_end calls synchronize_rcu() within a critical section.
That causes a deadlock; move the call after rcu_read_unlock().

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2015-07-09 08:47:58 +02:00
parent acf7b7fdf3
commit d09a6fde15

View File

@ -1266,9 +1266,10 @@ static int ram_save_complete(QEMUFile *f, void *opaque)
flush_compressed_data(f);
ram_control_after_iterate(f, RAM_CONTROL_FINISH);
migration_end();
rcu_read_unlock();
migration_end();
qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
return 0;