LoongArch: KVM: Check the return values for put_user()

put_user() may return -EFAULT, so, when the user space address is
invalid, the caller should return -EFAULT.

Cc: stable@vger.kernel.org
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Qiang Ma <maqianga@uniontech.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
This commit is contained in:
Qiang Ma 2026-06-11 20:46:43 +08:00 • committed by Huacai Chen
commit fb89e0fe2d