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: <CAAVpQUC-mV=SuNNhKbpy_1Mbh_sOs856+oNqDVJ4KcLjhDh2kw@mail.gmail.com>
Date: Sat, 12 Jul 2025 15:12:51 -0700
From: Kuniyuki Iwashima <kuniyu@...gle.com>
To: Yue Haibing <yuehaibing@...wei.com>
Cc: davem@...emloft.net, dsahern@...nel.org, edumazet@...gle.com, 
	kuba@...nel.org, pabeni@...hat.com, horms@...nel.org, netdev@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] ipv6: mcast: Remove unnecessary null check in mld_del_delrec()

On Sat, Jul 12, 2025 at 2:06 AM Yue Haibing <yuehaibing@...wei.com> wrote:
>
> These is no need to check null for pmc twice.
>
> Signed-off-by: Yue Haibing <yuehaibing@...wei.com>
> ---
>  net/ipv6/mcast.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
> index 6c875721d423..f3dae72aa9d3 100644
> --- a/net/ipv6/mcast.c
> +++ b/net/ipv6/mcast.c
> @@ -794,9 +794,7 @@ static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im)

Rather early return after the first loop if (!pmc) and
remove 1 nest level below.


>                         rcu_assign_pointer(pmc_prev->next, pmc->next);
>                 else
>                         rcu_assign_pointer(idev->mc_tomb, pmc->next);
> -       }
>
> -       if (pmc) {
>                 im->idev = pmc->idev;
>                 if (im->mca_sfmode == MCAST_INCLUDE) {
>                         tomb = rcu_replace_pointer(im->mca_tomb,
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ