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: <20220112083942.391fd0d7@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
Date:   Wed, 12 Jan 2022 08:39:42 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     David Ahern <dsahern@...il.com>
Cc:     cgel.zte@...il.com, davem@...emloft.net, yoshfuji@...ux-ipv6.org,
        dsahern@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Minghao Chi <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] net/ipv6: remove redundant err variable

On Wed, 12 Jan 2022 08:54:41 -0700 David Ahern wrote:
> On 1/12/22 1:26 AM, cgel.zte@...il.com wrote:
> > diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
> > index fe786df4f849..897194eb3b89 100644
> > --- a/net/ipv6/ip6_tunnel.c
> > +++ b/net/ipv6/ip6_tunnel.c
> > @@ -698,13 +698,12 @@ mplsip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
> >  	    u8 type, u8 code, int offset, __be32 info)
> >  {
> >  	__u32 rel_info = ntohl(info);
> > -	int err, rel_msg = 0;
> > +	int rel_msg = 0;  
> 
> this line needs to be moved down to maintain reverse xmas tree ordering.
> 
> You need to make the subject
> '[PATCH net-next] net/ipv6: remove redundant err variable'
> 
> and since net-next is closed you will need to resubmit when it is open.

Frankly I'm not sure these type of patches make sense.

Minghao how many instances of this pattern are there in the tree today?

What tools can we use to ensure the pattern does not get added back in
new patches?

> >  	u8 rel_type = type;
> >  	u8 rel_code = code;
> >  
> > -	err = ip6_tnl_err(skb, IPPROTO_MPLS, opt, &rel_type, &rel_code,
> > +	return ip6_tnl_err(skb, IPPROTO_MPLS, opt, &rel_type, &rel_code,
> >  			  &rel_msg, &rel_info, offset);

You should re-align continuation lines when you move the opening
bracket.

> > -	return err;
> >  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ