lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250714122927.GM721198@horms.kernel.org>
Date: Mon, 14 Jul 2025 13:29:27 +0100
From: Simon Horman <horms@...nel.org>
To: Yue Haibing <yuehaibing@...wei.com>
Cc: davem@...emloft.net, dsahern@...nel.org, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, Kuniyuki Iwashima <kuniyu@...gle.com>
Subject: Re: [PATCH net-next] ipv6: mcast: Remove unnecessary null check in
 ip6_mc_find_dev()

+ Iwashima-san

On Mon, Jul 14, 2025 at 04:17:32PM +0800, Yue Haibing wrote:
> These is no need to check null for idev before return NULL.
> 
> Signed-off-by: Yue Haibing <yuehaibing@...wei.com>
> ---
>  net/ipv6/mcast.c | 3 ---
>  1 file changed, 3 deletions(-)

This appears to be a side effect of
commit e6e14d582dd2 ("ipv6: mcast: Don't hold RTNL for MCAST_ socket options.")

I've CCed Iwashimsa-san, who wrote that patch.

But in any case this looks good to me.

Reviewed-by: Simon Horman <horms@...nel.org>

> diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
> index e95273ffb2f5..8aecdd85a6ae 100644
> --- a/net/ipv6/mcast.c
> +++ b/net/ipv6/mcast.c
> @@ -329,9 +329,6 @@ static struct inet6_dev *ip6_mc_find_dev(struct net *net,
>  	idev = in6_dev_get(dev);
>  	dev_put(dev);
>  
> -	if (!idev)
> -		return NULL;
> -
>  	return idev;
>  }
>  
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ