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-devel

[Xen-devel] [PATCH 05 of 12] xenpaging: catch xc_mem_paging_resume error

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 05 of 12] xenpaging: catch xc_mem_paging_resume errors
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Tue, 07 Jun 2011 11:53:07 +0200
Delivery-date: Tue, 07 Jun 2011 02:57:37 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1307440396; l=1007; s=domk; d=aepfle.de; h=To:From:Date:References:In-Reply-To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:X-RZG-CLASS-ID: X-RZG-AUTH; bh=//vypelD0lI2JrckQu1/G1t8uKM=; b=PWh4rsMhr3oXX8mhnv/Fd11JZsDLyTnPfKK9KK6osswkeeto9OM9Hy4Y3wQpFQgRd5I QdoeaJVqjWY7wZ2TFdezZ2mKmMBDZPGbcXVjtk5wHUe1e2Pu+QpvIJCdLIuBCMDMuZhRZ hDyK8ZBQ7yu5Xa1yuVXU0hmCxrKGLg/g+f8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1307440382@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1307440382@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.7.5
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1307437214 -7200
# Node ID 8eb07742f96854303ad7793f9319cd314dcf7be3
# Parent  c31636354b69164c06e86feed58f9713656b8f0c
xenpaging: catch xc_mem_paging_resume errors

In the unlikely event that xc_mem_paging_resume() fails, do not overwrite the
error with the return value from xc_evtchn_notify()

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r c31636354b69 -r 8eb07742f968 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Tue Jun 07 11:00:12 2011 +0200
+++ b/tools/xenpaging/xenpaging.c       Tue Jun 07 11:00:14 2011 +0200
@@ -405,8 +405,9 @@ static int xenpaging_resume_page(xenpagi
     /* Tell Xen page is ready */
     ret = xc_mem_paging_resume(paging->xc_handle, paging->mem_event.domain_id,
                                rsp->gfn);
-    ret = xc_evtchn_notify(paging->mem_event.xce_handle,
-                           paging->mem_event.port);
+    if ( ret == 0 ) 
+        ret = xc_evtchn_notify(paging->mem_event.xce_handle,
+                               paging->mem_event.port);
 
  out:
     return ret;

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