netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: giladb@ezchip.com
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	Gilad Ben-Yossef <gilad@benyossef.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Scott Feldman <sfeldma@gmail.com>
Subject: Re: [PATCH net] dsa: fix promiscuity leak on slave dev open error
Date: Fri, 26 Jun 2015 17:04:01 +0200	[thread overview]
Message-ID: <20150626150401.GH9469@lunn.ch> (raw)
In-Reply-To: <1435240213-15179-1-git-send-email-giladb@ezchip.com>

On Thu, Jun 25, 2015 at 04:50:13PM +0300, giladb@ezchip.com wrote:
> From: Gilad Ben-Yossef <gilad@benyossef.com>
> 
> DSA master netdev promiscuity counter was not being properly
> decremented on slave device open error path.
> 
> Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
> CC: Gilad Ben-Yossef <giladb@ezchip.com>
> CC: David S. Miller <davem@davemloft.net>
> CC: Florian Fainelli <f.fainelli@gmail.com>
> CC: Guenter Roeck <linux@roeck-us.net>
> CC: Andrew Lunn <andrew@lunn.ch>
> CC: Scott Feldman <sfeldma@gmail.com>

Hi Gilad

Acked-by: Andrew Lunn <andrew@lunn.ch>

FYI: I grep'ed the whole kernel. This seems to be the only place 0 is
passed to dev_set_promiscuity(), i.e. the same bug is not present
anywhere else.

Thanks
	Andrew

> ---
>  net/dsa/slave.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/dsa/slave.c b/net/dsa/slave.c
> index 04ffad3..0917123 100644
> --- a/net/dsa/slave.c
> +++ b/net/dsa/slave.c
> @@ -112,7 +112,7 @@ static int dsa_slave_open(struct net_device *dev)
>  
>  clear_promisc:
>  	if (dev->flags & IFF_PROMISC)
> -		dev_set_promiscuity(master, 0);
> +		dev_set_promiscuity(master, -1);
>  clear_allmulti:
>  	if (dev->flags & IFF_ALLMULTI)
>  		dev_set_allmulti(master, -1);
> -- 
> 1.7.1
> 

  reply	other threads:[~2015-06-26 15:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 13:50 [PATCH net] dsa: fix promiscuity leak on slave dev open error giladb
2015-06-26 15:04 ` Andrew Lunn [this message]
2015-06-28 13:19   ` Gilad Ben-Yossef
2015-06-28 17:09     ` Andrew Lunn
2015-06-26 16:40 ` Florian Fainelli
2015-06-28 23:57 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2015-06-25 13:32 Gilad Ben-Yossef

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150626150401.GH9469@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=gilad@benyossef.com \
    --cc=giladb@ezchip.com \
    --cc=linux@roeck-us.net \
    --cc=netdev@vger.kernel.org \
    --cc=sfeldma@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).