]> www.infradead.org Git - users/willy/xarray.git/commit
KVM: SVM: Fix an error code in sev_gmem_post_populate()
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 12 Jun 2024 11:50:39 +0000 (14:50 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 13 Aug 2024 10:08:40 +0000 (06:08 -0400)
commitcd2d00606553e631e9b5d11cca7da38fc95433e6
tree06975ba1614050cbf21f0b168f1b934405de47b6
parent696eb24ac2af632ddcb422114b2d8498af1de20c
KVM: SVM: Fix an error code in sev_gmem_post_populate()

The copy_from_user() function returns the number of bytes which it
was not able to copy.  Return -EFAULT instead.

Fixes: dee5a47cc7a4 ("KVM: SEV: Add KVM_SEV_SNP_LAUNCH_UPDATE command")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Message-ID: <20240612115040.2423290-4-dan.carpenter@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c