From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xen.org
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH 2/3] libxl: Do not use-after-free on ao progress reporting
Date: Wed, 16 May 2012 16:25:13 +0100 [thread overview]
Message-ID: <1337181914-7199-3-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1337181914-7199-1-git-send-email-ian.jackson@eu.citrix.com>
We need to call libxl__free_all after egc_run_callbacks since some of
the callbacks might be ao progress reports allocated from the egc's
gc.
Fixes a segfault in egc_run_callbacks.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
tools/libxl/libxl_event.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c
index 7e71a88..d3bb4da 100644
--- a/tools/libxl/libxl_event.c
+++ b/tools/libxl/libxl_event.c
@@ -1039,9 +1039,9 @@ static void egc_run_callbacks(libxl__egc *egc)
void libxl__egc_cleanup(libxl__egc *egc)
{
EGC_GC;
- libxl__free_all(gc);
-
egc_run_callbacks(egc);
+
+ libxl__free_all(gc);
}
/*
--
1.7.2.5
next prev parent reply other threads:[~2012-05-16 15:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 15:25 [PATCH 0/3] libxl: event handling fixes related to console/pygrub Roger Pau Monne <roger.pau@citrix.com> Ian Jackson
2012-05-16 15:25 ` [PATCH 1/3] libxl: events: debugging output relating to ao's Ian Jackson
2012-05-17 10:46 ` Ian Campbell
2012-05-18 11:11 ` Ian Jackson
2012-05-16 15:25 ` Ian Jackson [this message]
2012-05-17 10:49 ` [PATCH 2/3] libxl: Do not use-after-free on ao progress reporting Ian Campbell
2012-05-16 15:25 ` [PATCH 3/3] libxl, xl: fix bootloader immediate console attach Ian Jackson
2012-05-17 10:51 ` Ian Campbell
2012-05-17 13:46 ` [PATCH 0/3] libxl: event handling fixes related to console/pygrub Roger Pau Monne <roger.pau@citrix.com> Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337181914-7199-3-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).