diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-10-17 16:43:50 +0100 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-10-17 16:43:50 +0100 |
commit | 4f3c473d51d1c05bb08fecedfcf257d1a667bc5c (patch) | |
tree | 313e0f1208de7a39010b2a62a628e238664d9535 /xen/common/memory.c | |
parent | 96e5963780e91661bea6ec20b0d66bca800b9515 (diff) | |
download | xen-4f3c473d51d1c05bb08fecedfcf257d1a667bc5c.tar.gz xen-4f3c473d51d1c05bb08fecedfcf257d1a667bc5c.tar.bz2 xen-4f3c473d51d1c05bb08fecedfcf257d1a667bc5c.zip |
xen: change the limit of nr_extents to UINT_MAX >> MEMOP_EXTENT_SHIFT
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.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/common/memory.c')
-rw-r--r-- | 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 5bcb035086..401d06c7d6 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) ) |