OSDN Git Service

KVM: arm64: Free hypervisor allocations if vector slot init fails
authorSean Christopherson <seanjc@google.com>
Wed, 30 Nov 2022 23:09:01 +0000 (23:09 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 29 Dec 2022 20:41:06 +0000 (15:41 -0500)
commit6baaeda878445dc7b9e86f614ac39bf137c385af
treeb7cd99db427a554582c603e98487b3df643dc84c
parent466d27e48d7cd2542710309817cff1e91cd2e10a
KVM: arm64: Free hypervisor allocations if vector slot init fails

Teardown hypervisor mode if vector slot setup fails in order to avoid
leaking any allocations done by init_hyp_mode().

Fixes: b881cdce77b4 ("KVM: arm64: Allocate hyp vectors statically")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20221130230934.1014142-18-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/arm64/kvm/arm.c