direct-io.hg
changeset 15389:07be0266f6d8
32-on-64: Fix error path from memory_op() hypercall.
Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kfraser@localhost.localdomain |
---|---|
date | Wed Jun 20 13:38:22 2007 +0100 (2007-06-20) |
parents | 50358c4b37f4 |
children | 69658f935cc7 |
files | xen/common/compat/memory.c |
line diff
1.1 --- a/xen/common/compat/memory.c Wed Jun 20 11:50:16 2007 +0100 1.2 +++ b/xen/common/compat/memory.c Wed Jun 20 13:38:22 2007 +0100 1.3 @@ -258,7 +258,8 @@ int compat_memory_op(unsigned int cmd, X 1.4 compat_pfn_t pfn = nat.rsrv->extent_start.p[start_extent]; 1.5 1.6 BUG_ON(pfn != nat.rsrv->extent_start.p[start_extent]); 1.7 - if ( __copy_to_compat_offset(cmp.rsrv.extent_start, start_extent, &pfn, 1) ) 1.8 + if ( __copy_to_compat_offset(cmp.rsrv.extent_start, 1.9 + start_extent, &pfn, 1) ) 1.10 { 1.11 if ( split >= 0 ) 1.12 { 1.13 @@ -275,6 +276,10 @@ int compat_memory_op(unsigned int cmd, X 1.14 break; 1.15 } 1.16 } 1.17 + 1.18 + /* Bail if there was an error. */ 1.19 + if ( (split >= 0) && (end_extent != nat.rsrv->nr_extents) ) 1.20 + split = 0; 1.21 } 1.22 else 1.23 start_extent = end_extent;