summaryrefslogtreecommitdiff
path: root/arch/riscv/kvm/vcpu_vector.c
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-09-17 12:01:05 +0200
committerChristian Brauner <brauner@kernel.org>2025-09-19 14:26:14 +0200
commit7914f15c5e45ea6c76f2b3272ff39d8fe67b13f5 (patch)
tree32385a82110d012928536d7787b024add8818f63 /arch/riscv/kvm/vcpu_vector.c
parent885fc8ac0a4dc70f5d87b80b0977292870e35c60 (diff)
parent38f4885088fc5ad41b8b0a2a2cfc73d01e709e5c (diff)
Merge branch 'no-rebase-mnt_ns_tree_remove'
Bring in the fix for removing a mount namespace from the mount namespace rbtree and list. Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'arch/riscv/kvm/vcpu_vector.c')
-rw-r--r--arch/riscv/kvm/vcpu_vector.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/kvm/vcpu_vector.c b/arch/riscv/kvm/vcpu_vector.c
index a5f88cb717f3..05f3cc2d8e31 100644
--- a/arch/riscv/kvm/vcpu_vector.c
+++ b/arch/riscv/kvm/vcpu_vector.c
@@ -182,6 +182,8 @@ int kvm_riscv_vcpu_set_reg_vector(struct kvm_vcpu *vcpu,
struct kvm_cpu_context *cntx = &vcpu->arch.guest_context;
unsigned long reg_val;
+ if (reg_size != sizeof(reg_val))
+ return -EINVAL;
if (copy_from_user(&reg_val, uaddr, reg_size))
return -EFAULT;
if (reg_val != cntx->vector.vlenb)