diff options
author | Sasha Levin <sasha.levin@oracle.com> | 2015-10-21 12:41:54 -0400 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-10-21 12:44:22 -0400 |
commit | d6cd09ab54444a61d326c5a22544a1b2210eeb03 (patch) | |
tree | 9aa430f11acacb15e051b46448e98be247bf8201 | |
parent | 65b05c8a5deabb49378fe78e8a83ded524af09fe (diff) | |
download | kvmtool-master.tar.gz |
Unconditionally resuming a vm is wrong here, it may not even be paused to
begin with.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r-- | kvm-cpu.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -44,14 +44,11 @@ void kvm_cpu__run(struct kvm_cpu *vcpu) static void kvm_cpu_signal_handler(int signum) { - if (signum == SIGKVMEXIT) { - if (current_kvm_cpu && current_kvm_cpu->is_running) { + if (signum == SIGKVMEXIT) + if (current_kvm_cpu && current_kvm_cpu->is_running) current_kvm_cpu->is_running = false; - kvm__continue(current_kvm_cpu->kvm); - } - } else if (signum == SIGKVMPAUSE) { + else if (signum == SIGKVMPAUSE) current_kvm_cpu->paused = 1; - } } static void kvm_cpu__handle_coalesced_mmio(struct kvm_cpu *cpu) |