kvm: free resources after canceling async_pf
authorRadim Krčmář <rkrcmar@redhat.com>
Wed, 4 Sep 2013 20:32:23 +0000 (22:32 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 9 Jun 2014 12:29:03 +0000 (13:29 +0100)
commit21820c185fa08509ed2abaf4de43b56656eb038d
treef6e7b030dce655b3c7a6866cc7826753acd30dd8
parent6d7f02a611ae1a917db301e700b55e3af554d877
kvm: free resources after canceling async_pf

commit 28b441e24088081c1e213139d1303b451a34a4f4 upstream.

When we cancel 'async_pf_execute()', we should behave as if the work was
never scheduled in 'kvm_setup_async_pf()'.
Fixes a bug when we can't unload module because the vm wasn't destroyed.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
virt/kvm/async_pf.c