From: Johannes Berg <johannes@sipsolutions.net>
To: Yajun Deng <yajun.deng@linux.dev>,
davem@davemloft.net, kuba@kernel.org, ryazanov.s.a@gmail.com,
avagin@gmail.com, vladimir.oltean@nxp.com,
cong.wang@bytedance.com, roopa@cumulusnetworks.com,
zhudi21@huawei.com, edumazet@google.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] net: rtnetlink: Fix rtnl_dereference may be return NULL
Date: Thu, 08 Jul 2021 11:43:20 +0200 [thread overview]
Message-ID: <3c160d187382677abe40606a6a88ddac0809c328.camel@sipsolutions.net> (raw)
In-Reply-To: <20210708092936.20044-1-yajun.deng@linux.dev>
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.
> And modify the return
> value to 'void' in rtnl_unregister(). there is no case using it.
>
> Fixes: addf9b90de22 (net: rtnetlink: use rcu to free rtnl message handlers)
> Fixes: 51e13685bd93 (rtnetlink: RCU-annotate both dimensions of rtnl_msg_handlers)
It certainly fixes nothing in those patches.
johannes
next prev parent reply other threads:[~2021-07-08 9:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 9:29 Yajun Deng
2021-07-08 9:43 ` Johannes Berg [this message]
2021-07-08 11:11 ` Vladimir Oltean
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=3c160d187382677abe40606a6a88ddac0809c328.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=avagin@gmail.com \
--cc=cong.wang@bytedance.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--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
all inboxes | Powered by JetHome®