[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 5 of 7] xenpaging: catch xc_mem_paging_resume errors


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Thu, 31 Mar 2011 19:36:22 +0200
  • Delivery-date: Thu, 31 Mar 2011 10:40:45 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.