diff options
author | Olaf Hering <olaf@aepfle.de> | 2011-06-10 10:47:19 +0200 |
---|---|---|
committer | Olaf Hering <olaf@aepfle.de> | 2011-06-10 10:47:19 +0200 |
commit | e9f6c46e23434ed7155ce637cc90b5ef21dac015 (patch) | |
tree | 445060609cb3ff8b6e630ccd14b439599947fb06 /tools/xenpaging/xenpaging.c | |
parent | 40508ce065372b56253514638afe5b14bdc99159 (diff) | |
download | xen-e9f6c46e23434ed7155ce637cc90b5ef21dac015.tar.gz xen-e9f6c46e23434ed7155ce637cc90b5ef21dac015.tar.bz2 xen-e9f6c46e23434ed7155ce637cc90b5ef21dac015.zip |
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@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/xenpaging/xenpaging.c')
-rw-r--r-- | tools/xenpaging/xenpaging.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c index 194af53b33..6ede98768f 100644 --- a/tools/xenpaging/xenpaging.c +++ b/tools/xenpaging/xenpaging.c @@ -442,8 +442,9 @@ static int xenpaging_resume_page(xenpaging_t *paging, mem_event_response_t *rsp, /* 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; |