From 4fdeddfe04d0d0fdd4cc57bc25a02adf40dbb60a Mon Sep 17 00:00:00 2001 From: Gilad Ben-Yossef Date: Thu, 25 Jun 2015 16:50:13 +0300 Subject: [PATCH] dsa: fix promiscuity leak on slave dev open error DSA master netdev promiscuity counter was not being properly decremented on slave device open error path. Signed-off-by: Gilad Ben-Yossef CC: Gilad Ben-Yossef CC: David S. Miller CC: Florian Fainelli CC: Guenter Roeck CC: Andrew Lunn CC: Scott Feldman Acked-by: Andrew Lunn Acked-by: Florian Fainelli Signed-off-by: David S. Miller --- net/dsa/slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 04ffad311704..0917123790ea 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);