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>
This commit is contained in:
Sasha Levin
2015-10-19 10:40:49 -04:00
committed by Will Deacon
parent 4d7f252f21
commit a44c32936d

View File

@@ -266,4 +266,4 @@ int kvm_cpu__exit(struct kvm *kvm)
return r;
}
late_exit(kvm_cpu__exit);
core_exit(kvm_cpu__exit);