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:   Tue, 14 Jul 2020 16:16:15 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...ia.fr>
To:     Suraj Upadhyay <usuraj35@...il.com>
cc:     davem@...emloft.net, kuba@...nel.org,
        linux-decnet-user@...ts.sourceforge.net, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] decnet: dn_dev: Remove an unnecessary label.



On Tue, 14 Jul 2020, Suraj Upadhyay wrote:

> Remove the unnecessary label from dn_dev_ioctl() and make its error
> handling simpler to read.
>
> Signed-off-by: Suraj Upadhyay <usuraj35@...il.com>
> ---
>  net/decnet/dn_dev.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
> index 65abcf1b3210..64901bb9f314 100644
> --- a/net/decnet/dn_dev.c
> +++ b/net/decnet/dn_dev.c
> @@ -462,7 +462,9 @@ int dn_dev_ioctl(unsigned int cmd, void __user *arg)
>  	switch (cmd) {
>  	case SIOCGIFADDR:
>  		*((__le16 *)sdn->sdn_nodeaddr) = ifa->ifa_local;
> -		goto rarok;
> +		if (copy_to_user(arg, ifr, DN_IFREQ_SIZE))
> +			ret = -EFAULT;
> +			break;

The indentation on break does not look correct.

julia

>
>  	case SIOCSIFADDR:
>  		if (!ifa) {
> @@ -485,10 +487,6 @@ int dn_dev_ioctl(unsigned int cmd, void __user *arg)
>  	rtnl_unlock();
>
>  	return ret;
> -rarok:
> -	if (copy_to_user(arg, ifr, DN_IFREQ_SIZE))
> -		ret = -EFAULT;
> -	goto done;
>  }
>
>  struct net_device *dn_dev_get_default(void)
> --
> 2.17.1
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ