Thread (4 messages) flat view 4 messages, 4 authors, 2021-07-08

Re: [PATCH v2] net: rtnetlink: Fix rtnl_dereference may be return NULL

From: Eric Dumazet <hidden>
Date: 2021-07-08 12:26:45
Also in: lkml


On 7/8/21 1:11 PM, Vladimir Oltean wrote:
On Thu, Jul 08, 2021 at 11:43:20AM +0200, Johannes Berg wrote:
quoted
On Thu, 2021-07-08 at 17:29 +0800, Yajun Deng wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help