From: Adrian Bunk <bunk@stusta.de>
To: jeremy@xensource.com, chrisw@sous-sol.org
Cc: xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org
Subject: [2.6.23 patch] xenbus_xs.c: fix a use-after-free
Date: Mon, 23 Jul 2007 03:11:35 +0200 [thread overview]
Message-ID: <20070723011135.GU26212@stusta.de> (raw)
In-Reply-To: <20070723010204.GT26212@stusta.de>
This patch fixes an obvious use-after-free spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
--- linux-2.6.22-rc6-mm1/drivers/xen/xenbus/xenbus_xs.c.old 2007-07-23 03:04:20.000000000 +0200
+++ linux-2.6.22-rc6-mm1/drivers/xen/xenbus/xenbus_xs.c 2007-07-23 03:04:42.000000000 +0200
@@ -782,8 +782,8 @@ static int process_msg(void)
msg->u.watch.vec = split(body, msg->hdr.len,
&msg->u.watch.vec_size);
if (IS_ERR(msg->u.watch.vec)) {
- kfree(msg);
err = PTR_ERR(msg->u.watch.vec);
+ kfree(msg);
goto out;
}
next prev parent reply other threads:[~2007-07-23 1:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-23 1:02 xenbus_xs.c: use-after-free Adrian Bunk
2007-07-23 1:11 ` Adrian Bunk [this message]
2007-07-23 6:47 ` [2.6.23 patch] xenbus_xs.c: fix a use-after-free Jeremy Fitzhardinge
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=20070723011135.GU26212@stusta.de \
--to=bunk@stusta.de \
--cc=chrisw@sous-sol.org \
--cc=jeremy@xensource.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xensource.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