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]
Date:   Sat, 7 Nov 2020 15:48:25 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     menglong8.dong@...il.com
Cc:     davem@...emloft.net, kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Menglong Dong <dong.menglong@....com.cn>
Subject: Re: [PATCH] net: ipv4: remove redundant initialization in
 inet_rtm_deladdr

On Fri,  6 Nov 2020 01:42:37 -0500 menglong8.dong@...il.com wrote:
> From: Menglong Dong <dong.menglong@....com.cn>
> 
> The initialization for 'err' with '-EINVAL' is redundant and
> can be removed, as it is updated soon.
> 
> Signed-off-by: Menglong Dong <dong.menglong@....com.cn>

How many changes like this are there in the kernel right now?

I'm afraid that if there are too many it's not worth the effort.

Also - what tool do you use to find those, we need to make sure new
instances don't get into the tree.

> diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
> index 123a6d3..847cb18 100644
> --- a/net/ipv4/devinet.c
> +++ b/net/ipv4/devinet.c
> @@ -651,7 +651,7 @@ static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh,
>  	struct ifaddrmsg *ifm;
>  	struct in_ifaddr *ifa;
>  

You can remove this empty line while at it.

> -	int err = -EINVAL;
> +	int err;
>  
>  	ASSERT_RTNL();
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ