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 14 of 22] xenpaging: catch xc_mem_paging_resume error

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 14 of 22] xenpaging: catch xc_mem_paging_resume errors
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Fri, 10 Jun 2011 11:13:03 +0200
Delivery-date: Fri, 10 Jun 2011 02:28:01 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1307697185; 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=0S7BL/ZTCSuAijUTrP6QBVzhj2k=; b=P9LEIBUNHwcPZx1O4+sCe6fmYQx/SoF0dP/G2SVVAxZLroXpWyiSVCp6T5IaR076lOA d4Spksa3KaFPym79NMZYXLw1krSaI5d3UObLkl8DUjjPwiROAHt6bT2ejH2TmB+ZYVUoM etnELhUmokAygzB1gY8C7Cc6e66P6S8MfIQ=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1307697169@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.1307697169@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.7.5
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1307695639 -7200
# Node ID c67d7c0936969d076e30700c9a8f57080238be4e
# Parent  f26f07e19318b112b58ee370c16bee8bf5605d3f
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 f26f07e19318 -r c67d7c093696 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Fri Jun 10 10:47:18 2011 +0200
+++ b/tools/xenpaging/xenpaging.c       Fri Jun 10 10:47:19 2011 +0200
@@ -442,8 +442,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

<Prev in Thread] Current Thread [Next in Thread>