ia64/xen-unstable

changeset 12378:d19deb173503

[IA64,PPC] Fix xencomm_add_offset(). index must be incremented.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author kfraser@localhost.localdomain
date Fri Nov 10 15:27:22 2006 +0000 (2006-11-10)
parents 25e6a17e82f0
children ebed72718263 ca75b51d69c7
files xen/arch/ia64/xen/xencomm.c xen/arch/powerpc/usercopy.c
line diff
     1.1 --- a/xen/arch/ia64/xen/xencomm.c	Fri Nov 10 14:53:00 2006 +0000
     1.2 +++ b/xen/arch/ia64/xen/xencomm.c	Fri Nov 10 15:27:22 2006 +0000
     1.3 @@ -345,6 +345,11 @@ xencomm_add_offset(
     1.4          unsigned int chunksz;
     1.5          unsigned int chunk_skip;
     1.6  
     1.7 +        if (dest_paddr == XENCOMM_INVALID) {
     1.8 +            i++;
     1.9 +            continue;
    1.10 +        }
    1.11 +
    1.12          pgoffset = dest_paddr % PAGE_SIZE;
    1.13          chunksz = PAGE_SIZE - pgoffset;
    1.14  
    1.15 @@ -356,6 +361,8 @@ xencomm_add_offset(
    1.16              desc->address[i] += chunk_skip;
    1.17          }
    1.18          bytes -= chunk_skip;
    1.19 +	
    1.20 +	i++;
    1.21      }
    1.22      return handle;
    1.23  }
     2.1 --- a/xen/arch/powerpc/usercopy.c	Fri Nov 10 14:53:00 2006 +0000
     2.2 +++ b/xen/arch/powerpc/usercopy.c	Fri Nov 10 15:27:22 2006 +0000
     2.3 @@ -249,6 +249,11 @@ int xencomm_add_offset(void *handle, uns
     2.4          unsigned int chunksz;
     2.5          unsigned int chunk_skip;
     2.6  
     2.7 +        if (dest_paddr == XENCOMM_INVALID) {
     2.8 +            i++;
     2.9 +            continue;
    2.10 +        }
    2.11 +
    2.12          pgoffset = dest_paddr % PAGE_SIZE;
    2.13          chunksz = PAGE_SIZE - pgoffset;
    2.14  
    2.15 @@ -260,6 +265,8 @@ int xencomm_add_offset(void *handle, uns
    2.16              desc->address[i] += chunk_skip;
    2.17          }
    2.18          bytes -= chunk_skip;
    2.19 +
    2.20 +	i++;
    2.21      }
    2.22      return 0;
    2.23  }