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

[Xen-changelog] [xen stable-4.4] libxl: Fix error path in libxl_device_events_handler



commit 6c6cc5af3d5ee0477651f4b3e63230403269f8c5
Author:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
AuthorDate: Wed Feb 19 14:03:29 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Thu May 22 16:53:03 2014 +0100

    libxl: Fix error path in libxl_device_events_handler
    
    libxl_device_events_handler would fail to call AO_ABORT if it failed;
    instead it would simply return rc.  (This leaves the egc etc. from the
    now-abolished stack frame potentially live, and leaves the ctx
    locked.)
    
    In xl, this is of no consequence, because xl will immediately exit in
    this situation.  This is very likely to be true in any other callers
    (of which we don't know of any, anyway).
    
    Coverity-ID: 1181840
    Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    CC: coverity@xxxxxxxxxxxxxx
    (cherry picked from commit c566ab68af7da089ae2b0ff664d02a93a0647584)
---
 tools/libxl/libxl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 730f6e1..2d29ad2 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -3881,7 +3881,8 @@ int libxl_device_events_handler(libxl_ctx *ctx,
 
 out:
     GC_FREE;
-    return rc ? : AO_INPROGRESS;
+    if (rc) return AO_ABORT(rc);
+    return AO_INPROGRESS;
 }
 
 
/******************************************************************************/
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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