From: David Miller <davem@davemloft.net>
To: xiyou.wangcong@gmail.com
Cc: netdev@vger.kernel.org, tgraf@suug.ch, jhs@mojatatu.com
Subject: Re: [Patch net] cls_cgroup: fix memory leak in cls_cgroup_change()
Date: Fri, 03 Jan 2014 21:02:09 -0500 (EST) [thread overview]
Message-ID: <20140103.210209.901517258686201934.davem@davemloft.net> (raw)
In-Reply-To: <1388776399-27657-1-git-send-email-xiyou.wangcong@gmail.com>
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Fri, 3 Jan 2014 11:13:19 -0800
> Fix it by moving allocation to ->init().
>
> Cc: Thomas Graf <tgraf@suug.ch>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
I don't understand how the memory leak can happen, please explain
it in your commit message.
Also:
> {
> + struct cls_cgroup_head *head;
> + head = kzalloc(sizeof(*head), GFP_KERNEL);
Please add an empty line between local variable declarations
and code.
Thanks.
next prev parent reply other threads:[~2014-01-04 2:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-03 19:13 [Patch net] cls_cgroup: fix memory leak in cls_cgroup_change() Cong Wang
2014-01-04 2:02 ` David Miller [this message]
2014-01-06 23:23 ` Cong Wang
2014-01-07 21:19 ` Thomas Graf
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=20140103.210209.901517258686201934.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
--cc=xiyou.wangcong@gmail.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).