# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 101ae33a83415a6bf133df61f9ff280fa24e7c2d
# Parent b92ca87a2403d465e4d1087f8a7a43223b21bed8
Small fix to the error-return path after calling
__copy_to_user in the swiotlb sync function. We cannot
immediately exit the sync function as there may be tail work
to do (e.g., kunmap_atomic). In fact, doing nothing is the
right thing to do and is sufficient to avoid compiler
warnings about not checking the __copy_to_user return value.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
diff -r b92ca87a2403 -r 101ae33a8341
linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c Fri Dec 16
23:43:00 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c Sat Dec 17
01:11:54 2005
@@ -223,7 +223,7 @@
host = kmp + buffer.offset;
if (dir == DMA_FROM_DEVICE) {
if (__copy_to_user(host, dev, bytes))
- return; /* inaccessible */
+ /* inaccessible */;
} else
memcpy(dev, host, bytes);
kunmap_atomic(kmp, KM_SWIOTLB);
@@ -236,7 +236,7 @@
page_to_pseudophys(buffer.page)) + buffer.offset;
if (dir == DMA_FROM_DEVICE) {
if (__copy_to_user(host, dma_addr, size))
- return; /* inaccessible */
+ /* inaccessible */;
} else if (dir == DMA_TO_DEVICE)
memcpy(dma_addr, host, size);
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|