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] [day] [month] [year] [list]
Message-Id: <20140615.200520.1683239215774653858.davem@davemloft.net>
Date:	Sun, 15 Jun 2014 20:05:20 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	panweiping3@...il.com
Cc:	netdev@...r.kernel.org, edumazet@...gle.com
Subject: Re: [PATCH net 1/2] net: delete duplicate dev_set_rx_mode() call

From: Weiping Pan <panweiping3@...il.com>
Date: Sun, 15 Jun 2014 18:05:09 +0800

> In __dev_open(), it already calls dev_set_rx_mode().
> and dev_set_rx_mode() has no effect for a net device which does not have
> IFF_UP flag set.
> 
> So the call of dev_set_rx_mode() is duplicate in __dev_change_flags().
> 
> Signed-off-by: Weiping Pan <panweiping3@...il.com>
> ---
>  net/core/dev.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 30eedf6..002678f 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -5434,9 +5434,6 @@ int __dev_change_flags(struct net_device *dev, unsigned int flags)
>  	ret = 0;
>  	if ((old_flags ^ flags) & IFF_UP) {	/* Bit is different  ? */
>  		ret = ((old_flags & IFF_UP) ? __dev_close : __dev_open)(dev);
> -
> -		if (!ret)
> -			dev_set_rx_mode(dev);
>  	}

A single line statement is what we end up with, so kill the curly braces
as they are no longer necessary.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ