Re: [PATCH] net: rtnetlink: Fix rtnl_dereference return value is NULL

From: Eric Dumazet
Date: Thu Jul 08 2021 - 04:08:38 EST




On 7/8/21 9:37 AM, Yajun Deng wrote:
> rtnl_dereference() may be return NULL in rtnl_unregister(),
> so add this case handling.
>
> Signed-off-by: Yajun Deng <yajun.deng@xxxxxxxxx>
> ---
> net/core/rtnetlink.c | 17 ++++++++++-------
> 1 file changed, 10 insertions(+), 7 deletions(-)
>

I do not see a use case for this.
None of rtnl_unregister() callers check the return value anyway.

Can you elaborate ?

If this was a bug fix, we would need a Fixes: tag.

If this is something you need for an upcoming work, you would need to tag
this for net-next tree.

Thanks.