linux_dsm_epyc7002/arch/x86/kvm/svm
Dan Carpenter ff2bd9ff11 KVM: SVM: Fix sev_pin_memory() error handling
The sev_pin_memory() function was modified to return error pointers
instead of NULL but there are two problems.  The first problem is that
if "npages" is zero then it still returns NULL.  Secondly, several of
the callers were not updated to check for error pointers instead of
NULL.

Either one of these issues will lead to an Oops.

Fixes: a8d908b587 ("KVM: x86: report sev_pin_memory errors with PTR_ERR")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Message-Id: <20200714142351.GA315374@mwanda>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-02 05:23:06 -04:00
..
avic.c KVM: SVM: Add vmcb_ prefix to mark_*() functions 2020-07-08 16:21:48 -04:00
nested.c KVM: nSVM: Correctly set the shadow NPT root level in its MMU role 2020-07-30 18:13:23 -04:00
pmu.c KVM: x86/pmu: Tweak kvm_pmu_get_msr to pass 'struct msr_data' in 2020-06-01 04:26:08 -04:00
sev.c KVM: SVM: Fix sev_pin_memory() error handling 2020-08-02 05:23:06 -04:00
svm.c KVM: x86: Specify max TDP level via kvm_configure_mmu() 2020-07-30 18:18:08 -04:00
svm.h KVM: nSVM: prepare to handle errors from enter_svm_guest_mode() 2020-07-10 12:55:13 -04:00
vmenter.S x86/kvm/svm: Move guest enter/exit into .noinstr.text 2020-07-09 07:08:41 -04:00