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