[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3c160d187382677abe40606a6a88ddac0809c328.camel@sipsolutions.net>
Date: Thu, 08 Jul 2021 11:43:20 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Yajun Deng <yajun.deng@...ux.dev>, davem@...emloft.net,
kuba@...nel.org, ryazanov.s.a@...il.com, avagin@...il.com,
vladimir.oltean@....com, cong.wang@...edance.com,
roopa@...ulusnetworks.com, zhudi21@...wei.com, edumazet@...gle.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] net: rtnetlink: Fix rtnl_dereference may be return
NULL
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
Powered by blists - more mailing lists