Arm/domctl: correct XEN_DOMCTL_vuart_op error return value

copy_to_guest() returns the number of bytes not copied; that's not what
the function should return to its caller though. Convert to returning
-EFAULT instead.

Fixes: 86039f2e8c ("xen/arm: vpl011: Add a new domctl API to initialize vpl011")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Michal Orzel <michal.orzel@amd.com>
This commit is contained in:
Jan Beulich committed 2025-03-27 12:22:39 +01:00
1 parent 855337ca49
commit 341c0df40b
1 file changed
+2 -2
+2 -2
View File
@@ -172,8 +172,8 @@ long arch_do_domctl(struct xen_domctl *domctl, struct domain *d,
break;
}
if ( !rc )
rc = copy_to_guest(u_domctl, domctl, 1);
if ( !rc && copy_to_guest(u_domctl, domctl, 1) )
rc = -EFAULT;
return rc;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.