[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 18/21] xen: change the limit of nr_extents to UINT_MAX >> MEMOP_EXTENT_SHIFT



>>> On 05.10.12 at 12:38, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
> From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> 
> Currently do_memory_op has a different maximum limit for nr_extents on
> 32 bit and 64 bit.
> Change the limit to UINT_MAX >> MEMOP_EXTENT_SHIFT, so that it is the
> same in both cases.

As said before, this looks fine to me, but will need Keir's ack
anyway for you to apply it (but feel free to stick my ack onto
it anyway if you like). Plus it really is entirely independent of
the rest of the series, so doesn't need to wait for any other
eventual issues to be resolved.

Jan

> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> Cc: keir@xxxxxxx 
> Cc: JBeulich@xxxxxxxx 
> ---
>  xen/common/memory.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/xen/common/memory.c b/xen/common/memory.c
> index 5bcb035..401d06c 100644
> --- a/xen/common/memory.c
> +++ b/xen/common/memory.c
> @@ -540,7 +540,7 @@ long do_memory_op(unsigned long cmd, 
> XEN_GUEST_HANDLE(void) arg)
>              return start_extent;
>  
>          /* Is size too large for us to encode a continuation? */
> -        if ( reservation.nr_extents > (ULONG_MAX >> MEMOP_EXTENT_SHIFT) )
> +        if ( reservation.nr_extents > (UINT_MAX >> MEMOP_EXTENT_SHIFT) )
>              return start_extent;
>  
>          if ( unlikely(start_extent >= reservation.nr_extents) )
> -- 
> 1.7.9.1




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.