[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Fix xencomm_copy_{from, to}_guest.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1168613487 0 # Node ID 6a53d3abe7f8e3105d3bfb02a7e3876c1c3222fc # Parent f159e81e0b44b7e0662678748be488eec3e46458 Fix xencomm_copy_{from, to}_guest. It should not call paddr_to_maddr() with invalid address. Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx> --- xen/common/xencomm.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -r f159e81e0b44 -r 6a53d3abe7f8 xen/common/xencomm.c --- a/xen/common/xencomm.c Fri Jan 12 14:50:01 2007 +0000 +++ b/xen/common/xencomm.c Fri Jan 12 14:51:27 2007 +0000 @@ -119,7 +119,7 @@ xencomm_copy_from_guest(void *to, const chunksz -= chunk_skip; skip -= chunk_skip; - if (skip == 0) { + if (skip == 0 && chunksz > 0) { unsigned long src_maddr; unsigned long dest = (unsigned long)to + to_pos; unsigned int bytes = min(chunksz, n - to_pos); @@ -225,7 +225,7 @@ xencomm_copy_to_guest(void *to, const vo chunksz -= chunk_skip; skip -= chunk_skip; - if (skip == 0) { + if (skip == 0 && chunksz > 0) { unsigned long dest_maddr; unsigned long source = (unsigned long)from + from_pos; unsigned int bytes = min(chunksz, n - from_pos); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |