From: Oleg Nesterov <oleg@tv-sign.ru>
To: Andrew Morton <akpm@osdl.org>
Cc: Thomas Graf <tgraf@suug.ch>,
Shailabh Nagar <nagar@watson.ibm.com>,
Balbir Singh <balbir@in.ibm.com>, Jay Lan <jlan@sgi.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] taskstats: fix? sk_buff leak
Date: Sun, 29 Oct 2006 16:24:49 +0300 [thread overview]
Message-ID: <20061029132449.GA1142@oleg> (raw)
Compile tested only, and I know nothing about net/. Needs an ack from
maintainer.
'return genlmsg_cancel()' in taskstats_user_cmd/taskstats_exit_send looks
wrong to me. Unless we pass 'rep_skb' to the netlink layer we own sk_buff,
yes? This means we should always do kfree_skb() on failure.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- STATS/kernel/taskstats.c~1_skb 2006-10-29 15:12:51.000000000 +0300
+++ STATS/kernel/taskstats.c 2006-10-29 16:16:05.000000000 +0300
@@ -411,7 +411,7 @@ static int taskstats_user_cmd(struct sk_
return send_reply(rep_skb, info->snd_pid);
nla_put_failure:
- return genlmsg_cancel(rep_skb, reply);
+ genlmsg_cancel(rep_skb, reply);
err:
nlmsg_free(rep_skb);
return rc;
@@ -507,7 +507,6 @@ send:
nla_put_failure:
genlmsg_cancel(rep_skb, reply);
- goto ret;
err_skb:
nlmsg_free(rep_skb);
ret:
next reply other threads:[~2006-10-29 12:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-29 13:24 Oleg Nesterov [this message]
2006-10-29 12:33 ` [PATCH] taskstats: fix? sk_buff leak Thomas Graf
2006-10-29 13:45 ` Oleg Nesterov
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=20061029132449.GA1142@oleg \
--to=oleg@tv-sign.ru \
--cc=akpm@osdl.org \
--cc=balbir@in.ibm.com \
--cc=jlan@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nagar@watson.ibm.com \
--cc=tgraf@suug.ch \
/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