aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2015-10-19 10:40:49 -0400
committerWill Deacon <will.deacon@arm.com>2015-10-27 16:08:53 +0000
commita44c32936dffd6d5b01abf2fbf8e9f1632f3273d (patch)
treee631ae6c7176006a19a7d7d33025e07bc82bf34c
parent4d7f252f21108371553c2a3904195bdf98e94e04 (diff)
downloadkvmtool-a44c32936dffd6d5b01abf2fbf8e9f1632f3273d.tar.gz
kvmtool: correct order of the vcpu destructor
The vcpu module is a core component which should be removed last, but the destructor was mistakenly marked as something that should be done first. This would cause the vcpu data to be freed up before anything else had the chance to exit, and assuming that that data was still valid - causing use after frees. Reported-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--kvm-cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kvm-cpu.c b/kvm-cpu.c
index 664795f2..ad4441b1 100644
--- a/kvm-cpu.c
+++ b/kvm-cpu.c
@@ -266,4 +266,4 @@ int kvm_cpu__exit(struct kvm *kvm)
return r;
}
-late_exit(kvm_cpu__exit);
+core_exit(kvm_cpu__exit);