kvm: x86: 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>
Sat, 16 Nov 2019 09:29:50 +0000 (10:29 +0100)
commit2f57300f68fb40acff2e350686ec5e41463526c1
tree42c622f69f545a68fdae4fa2d7067cc96f6d511a
parentc6170b81e7b78942cb4b36fc72cbd75145fd08d5
kvm: x86: 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: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/mmu.c
arch/x86/kvm/paging_tmpl.h