diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-06-13 13:47:28 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-06-13 13:47:28 +0100 |
commit | 6c6d249dd5cbaecc415c2c9e2831201c4793ecc2 (patch) | |
tree | 8fb8c00021b2e2168aef8b36d54320dd10694987 /xen/common/compat | |
parent | bf291c0fbcbb10e1af85875a0569f23ab7f33475 (diff) | |
download | xen-6c6d249dd5cbaecc415c2c9e2831201c4793ecc2.tar.gz xen-6c6d249dd5cbaecc415c2c9e2831201c4793ecc2.tar.bz2 xen-6c6d249dd5cbaecc415c2c9e2831201c4793ecc2.zip |
32-on-64: Fix error handling for XENMEM_decrease_reservation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/compat')
-rw-r--r-- | xen/common/compat/memory.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xen/common/compat/memory.c b/xen/common/compat/memory.c index 491a9ce568..17519f5688 100644 --- a/xen/common/compat/memory.c +++ b/xen/common/compat/memory.c @@ -250,7 +250,7 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE(void) compat) case XENMEM_decrease_reservation: case XENMEM_populate_physmap: end_extent = split >= 0 ? rc : cmd >> MEMOP_EXTENT_SHIFT; - if ( op != XENMEM_decrease_reservation && + if ( (op != XENMEM_decrease_reservation) && !guest_handle_is_null(nat.rsrv->extent_start) ) { for ( ; start_extent < end_extent; ++start_extent ) @@ -276,13 +276,14 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE(void) compat) break; } } - - /* Bail if there was an error. */ - if ( (split >= 0) && (end_extent != nat.rsrv->nr_extents) ) - split = 0; } else + { start_extent = end_extent; + } + /* Bail if there was an error. */ + if ( (split >= 0) && (end_extent != nat.rsrv->nr_extents) ) + split = 0; break; case XENMEM_exchange: |