From: Eric Dumazet <eric.dumazet@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>,
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 14:26:37 +0200 [thread overview]
Message-ID: <7e11f410-9a97-c7d8-ee6a-fa776a4d1f0e@gmail.com> (raw)
In-Reply-To: <20210708111118.kti4jprkz7bus62g@skbuf>
On 7/8/21 1:11 PM, Vladimir Oltean wrote:
> 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?
>
Only from linux-5.3 I think.
(commit 12edff045bc6dd3ab1565cc02fa4841803c2a633 was not backported to old kernels)
But yes, this patch is not solving any bug, as I suspected.
prev parent reply other threads:[~2021-07-08 12:26 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
2021-07-08 12:26 ` Eric Dumazet [this message]
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=7e11f410-9a97-c7d8-ee6a-fa776a4d1f0e@gmail.com \
--to=eric.dumazet@gmail.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=vladimir.oltean@nxp.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;
as well as URLs for NNTP newsgroup(s).