# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1182343102 -3600
# Node ID 07be0266f6d88f2a8343b54f36301f3adac88d18
# Parent 50358c4b37f4fcaac1061f1c84a865932401c1be
32-on-64: Fix error path from memory_op() hypercall.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
xen/common/compat/memory.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)
diff -r 50358c4b37f4 -r 07be0266f6d8 xen/common/compat/memory.c
--- a/xen/common/compat/memory.c Wed Jun 20 11:50:16 2007 +0100
+++ b/xen/common/compat/memory.c Wed Jun 20 13:38:22 2007 +0100
@@ -258,7 +258,8 @@ int compat_memory_op(unsigned int cmd, X
compat_pfn_t pfn = nat.rsrv->extent_start.p[start_extent];
BUG_ON(pfn != nat.rsrv->extent_start.p[start_extent]);
- if ( __copy_to_compat_offset(cmp.rsrv.extent_start,
start_extent, &pfn, 1) )
+ if ( __copy_to_compat_offset(cmp.rsrv.extent_start,
+ start_extent, &pfn, 1) )
{
if ( split >= 0 )
{
@@ -275,6 +276,10 @@ 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;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|