[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 1/7] xencomm take 3: xen side trivial bug fix



# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1187077482 -32400
# Node ID 68867379b785a9a6fd37ca75be64fa7b5e3b8a2b
# Parent  cd51fa91956be20dbd744d46117f7f989e08c334
[xen, xencomm] xencomm trivial bug fix
- fix return address of xencomm_copy_to_guest()
- fix xencomm_add_offset()
PATCHNAME: xencomm_trivial_fix

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r cd51fa91956b -r 68867379b785 xen/common/xencomm.c
--- a/xen/common/xencomm.c      Sun Aug 12 14:50:02 2007 -0600
+++ b/xen/common/xencomm.c      Tue Aug 14 16:44:42 2007 +0900
@@ -232,7 +232,7 @@ xencomm_copy_to_guest(void *to, const vo
 
             dest_maddr = paddr_to_maddr(dest_paddr + chunk_skip);
             if (dest_maddr == 0)
-                return -1;
+                return n - from_pos;
 
             if (xencomm_debug)
                 printk("%lx[%d] -> %lx\n", source, bytes, dest_maddr);
@@ -279,6 +279,11 @@ int xencomm_add_offset(void **handle, un
         unsigned int pgoffset;
         unsigned int chunksz;
         unsigned int chunk_skip;
+
+        if (dest_paddr == XENCOMM_INVALID) {
+            i++;
+            continue;
+        }
 
         pgoffset = dest_paddr % PAGE_SIZE;
         chunksz = PAGE_SIZE - pgoffset;
@@ -291,6 +296,8 @@ int xencomm_add_offset(void **handle, un
             desc->address[i] += chunk_skip;
         }
         bytes -= chunk_skip;
+
+        i++;
     }
     return 0;
 }

Attachment: 15725_68867379b785_xencomm_trivial_fix.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.