From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Yajun Deng <yajun.deng@linux.dev>,
"davem@davemloft.net" <davem@davemloft.net>,
"kuba@kernel.org" <kuba@kernel.org>,
"ryazanov.s.a@gmail.com" <ryazanov.s.a@gmail.com>,
"avagin@gmail.com" <avagin@gmail.com>,
"cong.wang@bytedance.com" <cong.wang@bytedance.com>,
"roopa@cumulusnetworks.com" <roopa@cumulusnetworks.com>,
"zhudi21@huawei.com" <zhudi21@huawei.com>,
"edumazet@google.com" <edumazet@google.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] net: rtnetlink: Fix rtnl_dereference may be return NULL
Date: Thu, 8 Jul 2021 11:11:18 +0000 [thread overview]
Message-ID: <20210708111118.kti4jprkz7bus62g@skbuf> (raw)
In-Reply-To: <3c160d187382677abe40606a6a88ddac0809c328.camel@sipsolutions.net>
On Thu, Jul 08, 2021 at 11:43:20AM +0200, Johannes Berg wrote:
> On Thu, 2021-07-08 at 17:29 +0800, Yajun Deng wrote:
> > The value 'link' may be NULL in rtnl_unregister(), this leads to
> > kfree_rcu(NULL, xxx), so add this case handling.
> >
>
> I don't see how. It would require the caller to unregister something
> they never registered. That would be a bug there, but I don't see that
> it's very useful to actually be defensive about bugs there.
Besides, isn't kfree_rcu(NULL) safe anyway?
next prev parent reply other threads:[~2021-07-08 11:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 9:29 [PATCH v2] net: rtnetlink: Fix rtnl_dereference may be return NULL Yajun Deng
2021-07-08 9:43 ` Johannes Berg
2021-07-08 11:11 ` Vladimir Oltean [this message]
2021-07-08 12:26 ` Eric Dumazet
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=20210708111118.kti4jprkz7bus62g@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=avagin@gmail.com \
--cc=cong.wang@bytedance.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=ryazanov.s.a@gmail.com \
--cc=yajun.deng@linux.dev \
--cc=zhudi21@huawei.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