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: Johannes Berg <johannes@sipsolutions.net>
Date: 2021-07-08 09:43:41
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help