aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2015-10-21 12:41:54 -0400
committerSasha Levin <sasha.levin@oracle.com>2015-10-21 12:44:22 -0400
commitd6cd09ab54444a61d326c5a22544a1b2210eeb03 (patch)
tree9aa430f11acacb15e051b46448e98be247bf8201
parent65b05c8a5deabb49378fe78e8a83ded524af09fe (diff)
downloadkvmtool-master.tar.gz
kvmtool: don't unpause vm when exiting vcpu threadsHEADmaster
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.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/kvm-cpu.c b/kvm-cpu.c
index ad4441b1..b56fd3be 100644
--- a/kvm-cpu.c
+++ b/kvm-cpu.c
@@ -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)