kvm: mmu: Do not release the page inside mmu_set_spte()
authorJunaid Shahid <junaids@google.com>
Fri, 4 Jan 2019 00:22:21 +0000 (16:22 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2019 18:21:40 +0000 (19:21 +0100)
commit8aaac30686233108e8a8648f95dd4ec0e0123389
tree64ffdcdc90317de066a09588770a00448ac0783c
parent30d8d8d6cd928b5bc8547aca6d8eb30b334d5451
kvm: mmu: Do not release the page inside mmu_set_spte()

commit 43fdcda96e2550c6d1c46fb8a78801aa2f7276ed upstream.

Release the page at the call-site where it was originally acquired.
This makes the exit code cleaner for most call sites, since they
do not need to duplicate code between success and the failure
label.

Signed-off-by: Junaid Shahid <junaids@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/mmu.c
arch/x86/kvm/paging_tmpl.h