From: akpm@linux-foundation.org
To: julia@diku.dk, ericvh@gmail.com, lucho@ionkov.net,
rminnich@sandia.gov, mm-commits@vger.kernel.org
Subject: - net-9p-trans_fdc-introduce-missing-kfree.patch removed from -mm tree
Date: Wed, 01 Oct 2008 14:28:55 -0700 [thread overview]
Message-ID: <200810012128.m91LSupf004881@imap1.linux-foundation.org> (raw)
The patch titled
net/9p/trans_fd.c: introduce missing kfree
has been removed from the -mm tree. Its filename was
net-9p-trans_fdc-introduce-missing-kfree.patch
This patch was dropped because it is obsolete
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: net/9p/trans_fd.c: introduce missing kfree
From: Julia Lawall <julia@diku.dk>
Error handling code following a kmalloc should free the allocated data.
The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,l;
position p1,p2;
expression *ptr != NULL;
@@
(
if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
|
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
)
<... when != x
when != if (...) { <+...x...+> }
x->f = E
...>
(
return \(0\|<+...x...+>\|ptr\);
|
return@p2 ...;
)
@script:python@
p1 << r.p1;
p2 << r.p2;
@@
print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
net/9p/trans_fd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff -puN net/9p/trans_fd.c~net-9p-trans_fdc-introduce-missing-kfree net/9p/trans_fd.c
--- a/net/9p/trans_fd.c~net-9p-trans_fdc-introduce-missing-kfree
+++ a/net/9p/trans_fd.c
@@ -787,8 +787,10 @@ static struct p9_req *p9_send_request(st
else
n = p9_mux_get_tag(m);
- if (n < 0)
+ if (n < 0) {
+ kfree(req);
return ERR_PTR(-ENOMEM);
+ }
p9_set_tag(tc, n);
_
Patches currently in -mm which might be from julia@diku.dk are
git-v4l-dvb.patch
git-infiniband.patch
git-ieee1394.patch
git-async_tx.patch
git-net.patch
git-mtd.patch
git-sound.patch
git-cpufreq.patch
git-gfs2.patch
git-ubifs.patch
git-block.patch
drivers-media-common-tuners-drop-code-after-return-or-goto.patch
drivers-scsi-use-div_round_up.patch
drivers-scsi-megaraid-use-div_round_up.patch
net-9p-trans_fdc-introduce-missing-kfree.patch
fs-9p-use-an-is_err-test-rather-than-a-null-test.patch
fs-namespacec-drop-code-after-return.patch
drivers-misc-use-div_round_up.patch
drivers-net-xen-netfrontc-use-div_round_up.patch
fs-reiserfs-use-an-is_err-test-rather-than-a-null-test.patch
reply other threads:[~2008-10-01 21:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200810012128.m91LSupf004881@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ericvh@gmail.com \
--cc=julia@diku.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=mm-commits@vger.kernel.org \
--cc=rminnich@sandia.gov \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.