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

Hi Gilad

Acked-by: Andrew Lunn <and...@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
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to