ia64/xen-unstable

changeset 17858:12ae02c09d1e

32-on-64: Fix error handling for XENMEM_decrease_reservation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 13 13:47:28 2008 +0100 (2008-06-13)
parents 7eab5d8788a6
children 08fb9a4489f7
files xen/common/compat/memory.c
line diff
     1.1 --- a/xen/common/compat/memory.c	Fri Jun 13 11:39:42 2008 +0100
     1.2 +++ b/xen/common/compat/memory.c	Fri Jun 13 13:47:28 2008 +0100
     1.3 @@ -250,7 +250,7 @@ int compat_memory_op(unsigned int cmd, X
     1.4          case XENMEM_decrease_reservation:
     1.5          case XENMEM_populate_physmap:
     1.6              end_extent = split >= 0 ? rc : cmd >> MEMOP_EXTENT_SHIFT;
     1.7 -            if ( op != XENMEM_decrease_reservation &&
     1.8 +            if ( (op != XENMEM_decrease_reservation) &&
     1.9                   !guest_handle_is_null(nat.rsrv->extent_start) )
    1.10              {
    1.11                  for ( ; start_extent < end_extent; ++start_extent )
    1.12 @@ -276,13 +276,14 @@ int compat_memory_op(unsigned int cmd, X
    1.13                          break;
    1.14                      }
    1.15                  }
    1.16 -
    1.17 -                /* Bail if there was an error. */
    1.18 -                if ( (split >= 0) && (end_extent != nat.rsrv->nr_extents) )
    1.19 -                    split = 0;
    1.20              }
    1.21              else
    1.22 +            {
    1.23                  start_extent = end_extent;
    1.24 +            }
    1.25 +            /* Bail if there was an error. */
    1.26 +            if ( (split >= 0) && (end_extent != nat.rsrv->nr_extents) )
    1.27 +                split = 0;
    1.28              break;
    1.29  
    1.30          case XENMEM_exchange: