WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Small fix to the error-return path after calling

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Small fix to the error-return path after calling
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 17 Dec 2005 12:28:07 +0000
Delivery-date: Sat, 17 Dec 2005 12:30:26 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Small fix to the error-return path after calling, Xen patchbot -unstable <=