# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1163136850 -32400 # Node ID 10cd8f17f3e583282fd4d8efa7d6f05f4a122319 # Parent 13397c9919becfc33466206f8488d7ce55097100 fix xencomm_add_offset(). index must be incremented. PATCHNAME: fix_xencomm_add_offset Signed-off-by: Isaku Yamahata diff -r 13397c9919be -r 10cd8f17f3e5 xen/arch/ia64/xen/xencomm.c --- a/xen/arch/ia64/xen/xencomm.c Fri Nov 10 14:26:32 2006 +0900 +++ b/xen/arch/ia64/xen/xencomm.c Fri Nov 10 14:34:10 2006 +0900 @@ -345,6 +345,11 @@ xencomm_add_offset( unsigned int chunksz; unsigned int chunk_skip; + if (dest_paddr == XENCOMM_INVALID) { + i++; + continue; + } + pgoffset = dest_paddr % PAGE_SIZE; chunksz = PAGE_SIZE - pgoffset; @@ -356,6 +361,8 @@ xencomm_add_offset( desc->address[i] += chunk_skip; } bytes -= chunk_skip; + + i++; } return handle; } diff -r 13397c9919be -r 10cd8f17f3e5 xen/arch/powerpc/usercopy.c --- a/xen/arch/powerpc/usercopy.c Fri Nov 10 14:26:32 2006 +0900 +++ b/xen/arch/powerpc/usercopy.c Fri Nov 10 14:34:10 2006 +0900 @@ -249,6 +249,11 @@ int xencomm_add_offset(void *handle, uns unsigned int chunksz; unsigned int chunk_skip; + if (dest_paddr == XENCOMM_INVALID) { + i++; + continue; + } + pgoffset = dest_paddr % PAGE_SIZE; chunksz = PAGE_SIZE - pgoffset; @@ -260,6 +265,8 @@ int xencomm_add_offset(void *handle, uns desc->address[i] += chunk_skip; } bytes -= chunk_skip; + + i++; } return 0; }