Arm/domctl: correct XEN_DOMCTL_vuart_op error return value
PATCH 1/1 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 <[email protected]>
xen/arch/arm/domctl.c +2 -2
@@ -172,8 +172,8 @@ long arch_do_domctl(struct xen_domctl *dbreak ; } -if ( !rc ) - rc =copy_to_guest (u_domctl, domctl,1 ); +if ( !rc &©_to_guest (u_domctl, domctl,1 ) ) + rc = -EFAULT ;return rc; }
Quoted 6 lines · Jan Beulich
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-EFAULTinstead.Fixes 86039f2e8c20 ("xen/arm: vpl011: Add a new domctl API to initialize vpl011")Signed-off-by Jan Beulich <[email protected]>
Reviewed-by Andrew Cooper <[email protected]>
Orzel, Michal
Acked-byQuoted 11 lines · Andrew Cooper
Quoted 6 lines · Jan Beulich
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-EFAULTinstead.Fixes 86039f2e8c20 ("xen/arm: vpl011: Add a new domctl API to initialize vpl011")Signed-off-by Jan Beulich <[email protected]>Reviewed-by Andrew Cooper <[email protected]>
Acked-by Michal Orzel <[email protected]>
~Michal