[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] 32-on-64: Fix error handling for XENMEM_decrease_reservation.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1213361248 -3600 # Node ID 12ae02c09d1e9f0cd7153f256618dcc544420d54 # Parent 7eab5d8788a6becb07d56a8ffa12b3675a21f4bb 32-on-64: Fix error handling for XENMEM_decrease_reservation. Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx> --- xen/common/compat/memory.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff -r 7eab5d8788a6 -r 12ae02c09d1e xen/common/compat/memory.c --- a/xen/common/compat/memory.c Fri Jun 13 11:39:42 2008 +0100 +++ b/xen/common/compat/memory.c Fri Jun 13 13:47:28 2008 +0100 @@ -250,7 +250,7 @@ int compat_memory_op(unsigned int cmd, X 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, X 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: _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |