> -----Original Message-----
> From: Andrew Cooper <andrew.coop...@citrix.com>
> Sent: 28 July 2020 12:37
> To: Xen-devel <xen-devel@lists.xenproject.org>
> Cc: Andrew Cooper <andrew.coop...@citrix.com>; George Dunlap 
> <george.dun...@eu.citrix.com>; Ian
> Jackson <ian.jack...@citrix.com>; Jan Beulich <jbeul...@suse.com>; Konrad 
> Rzeszutek Wilk
> <konrad.w...@oracle.com>; Stefano Stabellini <sstabell...@kernel.org>; Wei 
> Liu <w...@xen.org>; Julien
> Grall <jul...@xen.org>; Paul Durrant <p...@xen.org>; Michał Leszczyński 
> <michal.leszczyn...@cert.pl>;
> Hubert Jasudowicz <hubert.jasudow...@cert.pl>
> Subject: [PATCH 3/5] xen/memory: Fix compat XENMEM_acquire_resource for size 
> requests
> 
> Copy the nr_frames from the correct structure, so the caller doesn't
> unconditionally receive 0.
> 
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>

Reviewed-by: Paul Durrant <p...@xen.org>

> ---
> CC: George Dunlap <george.dun...@eu.citrix.com>
> CC: Ian Jackson <ian.jack...@citrix.com>
> CC: Jan Beulich <jbeul...@suse.com>
> CC: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
> CC: Stefano Stabellini <sstabell...@kernel.org>
> CC: Wei Liu <w...@xen.org>
> CC: Julien Grall <jul...@xen.org>
> CC: Paul Durrant <p...@xen.org>
> CC: Michał Leszczyński <michal.leszczyn...@cert.pl>
> CC: Hubert Jasudowicz <hubert.jasudow...@cert.pl>
> ---
>  xen/common/compat/memory.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/common/compat/memory.c b/xen/common/compat/memory.c
> index 3851f756c7..ed92e05b08 100644
> --- a/xen/common/compat/memory.c
> +++ b/xen/common/compat/memory.c
> @@ -599,7 +599,7 @@ int compat_memory_op(unsigned int cmd, 
> XEN_GUEST_HANDLE_PARAM(void) compat)
>                  if ( __copy_field_to_guest(
>                           guest_handle_cast(compat,
>                                             compat_mem_acquire_resource_t),
> -                         &cmp.mar, nr_frames) )
> +                         nat.mar, nr_frames) )
>                      return -EFAULT;
>              }
>              else
> --
> 2.11.0



Reply via email to