[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging-4.20] Arm/domctl: correct XEN_DOMCTL_vuart_op error return value
commit a2cf6f9d5275073c08f5778371dd2f04c6e744f8 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu Mar 27 15:01:18 2025 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Mar 27 15:01:18 2025 +0100 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: 86039f2e8c20 ("xen/arm: vpl011: Add a new domctl API to initialize vpl011") Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Michal Orzel <michal.orzel@xxxxxxx> master commit: 341c0df40bf73b0a5e27db27023ec400858a472d master date: 2025-03-27 12:22:39 +0100 --- xen/arch/arm/domctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c index 9d047065ba..ad914c915f 100644 --- a/xen/arch/arm/domctl.c +++ b/xen/arch/arm/domctl.c @@ -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; } -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.20
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |