From: Florian Westphal <fw@strlen.de>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: cscnull@gmail.com, Pablo Neira Ayuso <pablo@netfilter.org>,
kadlec@blackhole.kfki.hu, Florian Westphal <fw@strlen.de>,
David Miller <davem@davemloft.net>,
"Berg, Johannes" <johannes.berg@intel.com>,
Philippe Ombredanne <pombredanne@nexb.com>,
kstewart@linuxfoundation.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
dsahern@gmail.com, lucien.xin@gmail.com, ktkhai@virtuozzo.com,
Cong Wang <xiyou.wangcong@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] netlink: fix memory leak
Date: Sun, 22 Jul 2018 10:12:46 +0200 [thread overview]
Message-ID: <20180722081246.udphfijsnfnshrsc@breakpoint.cc> (raw)
In-Reply-To: <CAHmME9pLNd5GeR4kq_KHcarPKh3mkS5Cv-2s-tiQsPG6GcZ6sw@mail.gmail.com>
Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> On Sun, Jul 22, 2018 at 4:51 AM Shaochun Chen <cscnull@gmail.com> wrote:
> But even if you moved it somehow to the if(ret), I'm still not sure
> it'd be correct; start cbs should either succeed, or they should error
> out and cleanup entirely after themselves.
I agree, ->done() should not be called if cb->dump() was never invoked.
All ctnetlink and nf_tables spots need to cleanup after themselves.
next prev parent reply other threads:[~2018-07-22 9:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-22 2:49 [PATCH] netlink: fix memory leak Shaochun Chen
2018-07-22 5:00 ` Jason A. Donenfeld
2018-07-22 8:12 ` Florian Westphal [this message]
2018-07-22 9:02 ` Florian Westphal
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=20180722081246.udphfijsnfnshrsc@breakpoint.cc \
--to=fw@strlen.de \
--cc=Jason@zx2c4.com \
--cc=coreteam@netfilter.org \
--cc=cscnull@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=johannes.berg@intel.com \
--cc=kadlec@blackhole.kfki.hu \
--cc=kstewart@linuxfoundation.org \
--cc=ktkhai@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=pombredanne@nexb.com \
--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).