From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Elena Ufimtseva <elena.ufimtseva@oracle.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Kevin Tian <kevin.tian@intel.com>,
Yang Zhang <yang.z.zhang@intel.com>,
Jan Beulich <JBeulich@suse.com>
Subject: [PATCH] dmar: Fix double free in error paths following c/s a8bc99b
Date: Thu, 16 Jul 2015 12:57:03 +0100 [thread overview]
Message-ID: <1437047823-24686-1-git-send-email-andrew.cooper3@citrix.com> (raw)
Several error paths would end up freeing scope->devices twice.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Elena Ufimtseva <elena.ufimtseva@oracle.com>
CC: Yang Zhang <yang.z.zhang@intel.com>
CC: Kevin Tian <kevin.tian@intel.com>
---
xen/drivers/passthrough/vtd/dmar.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index 8ed1e24..2672688 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -88,6 +88,7 @@ static void scope_devices_free(struct dmar_scope *scope)
scope->devices_cnt = 0;
xfree(scope->devices);
+ scope->devices = NULL;
}
static void __init disable_all_dmar_units(void)
--
1.7.10.4
next reply other threads:[~2015-07-16 11:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 11:57 Andrew Cooper [this message]
2015-07-16 13:22 ` [PATCH] dmar: Fix double free in error paths following c/s a8bc99b Jan Beulich
2015-07-20 1:31 ` Tian, Kevin
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=1437047823-24686-1-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=elena.ufimtseva@oracle.com \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xen.org \
--cc=yang.z.zhang@intel.com \
/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).