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 5 of 7] xenpaging: catch xc_mem_paging_resume errors

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 5 of 7] xenpaging: catch xc_mem_paging_resume errors
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Thu, 31 Mar 2011 19:36:22 +0200
Delivery-date: Thu, 31 Mar 2011 10:40:45 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1301592981; l=966; 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=fPQFl4GLmV0EwlEvsjJH18buTVE=; b=aCpdb6hwrfPgA0NxrxmT6i+tYMiWXrWSNwIcdDYBx+iJ0maeeUDv+s/tjelAd95gBF9 V9MA38lTuv+VlM5RJ1V7CLMyeI6PitD5JZ/NyABHHIJdGkaFeAqYFfAhbgF5pRs5Uz5aA UdOcNrmhLdhkaLXa0kTYR/O1++Frzq1LM00=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1301592977@localhost>
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.1301592977@localhost>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.8
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1301591618 -7200
# Node ID bbf495e57371ae102d4e2fbb8ce1a5c54a7357c4
# Parent  8825c216096a80e5590ce075da273eeb06c1e7aa
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 8825c216096a -r bbf495e57371 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Thu Mar 31 19:13:19 2011 +0200
+++ b/tools/xenpaging/xenpaging.c       Thu Mar 31 19:13:38 2011 +0200
@@ -405,8 +405,9 @@
     /* 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