libxl: Fix error path in libxl_device_events_handler
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 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
--- tools/libxl/libxl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/libxl/libxl.c +2 -1
@@ -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 ; }/******************************************************************************/
Signature · 1 line
1.7.10.4
PATCH 2/2 xl: Comment error handling in dolog
Coverity-ID: 1087116
--- tools/libxl/xl_cmdimpl.c | 2 ++ 1 file changed, 2 insertions(+)
tools/libxl/xl_cmdimpl.c +2 -0
@@ -352,6 +352,8 @@ static void dolog(const char *file, int line, const char *func, char *fmt, ...) rc =vasprintf (&s, fmt, ap);va_end (ap);if (rc >=0 ) +/* we ignore write errors since we have no way to report them; +* the alternative would be to abort the whole program */ libxl_write_exactly (NULL , logfile, s, rc,NULL ,NULL );free (s); }
Signature · 1 line
1.7.10.4
Ian Jackson writes ("[PATCH 1/2] libxl: Fix error path in libxl_device_events_handler"):
Quoted 8 lines
libxl_device_events_handlerwould fail to callAO_ABORTif 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).
FAOD, I see no need for this to be in 4.4, although it should go in iff we are currently accepting trivial bugfixes.
Ian.
Quoted 6 lines · Ian Jackson
Ian Jackson writes ("[PATCH 1/2] libxl: Fix error path in
libxl_device_events_handler"):Quoted 5 lines
libxl_device_events_handlerwould fail to callAO_ABORTif 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.)
Quoted 6 lines
Quoted 3 lines
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).
FAOD, I see no need for this to be in 4.4, although it should go in iff we are currently accepting trivial bugfixes.
Acked + applied both.
Ian Campbell writes ("Re: [PATCH 1/2] libxl: Fix error path in libxl_device_events_handler"):
Quoted 5 lines · Ian Jackson
Quoted 2 lines
FAOD, I see no need for this to be in 4.4, although it should go in iff we are currently accepting trivial bugfixes.
Acked + applied both.
Backported to 4.4. The bug is not in 4.3.
Ian.