From: kfraser@localhost.localdomain Date: Fri, 10 Nov 2006 15:27:22 +0000 (+0000) Subject: [IA64,PPC] Fix xencomm_add_offset(). index must be incremented. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15567^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=acff088125bb38f2b9e40f49ae9a9159e183b129;p=xen.git [IA64,PPC] Fix xencomm_add_offset(). index must be incremented. Signed-off-by: Isaku Yamahata --- diff --git a/xen/arch/ia64/xen/xencomm.c b/xen/arch/ia64/xen/xencomm.c index 6ef781b0ea..8f6cec8cb7 100644 --- a/xen/arch/ia64/xen/xencomm.c +++ b/xen/arch/ia64/xen/xencomm.c @@ -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 --git a/xen/arch/powerpc/usercopy.c b/xen/arch/powerpc/usercopy.c index 48ab7579de..d653ed1a05 100644 --- a/xen/arch/powerpc/usercopy.c +++ b/xen/arch/powerpc/usercopy.c @@ -249,6 +249,11 @@ int xencomm_add_offset(void *handle, unsigned int bytes) 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, unsigned int bytes) desc->address[i] += chunk_skip; } bytes -= chunk_skip; + + i++; } return 0; }