summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorGilad Ben-Yossef <gilad@benyossef.com>2015-06-25 15:50:13 +0200
committerDavid S. Miller <davem@davemloft.net>2015-06-29 01:57:08 +0200
commit4fdeddfe04d0d0fdd4cc57bc25a02adf40dbb60a (patch)
tree29941982bdd6f540e4a0dd44536008b786b99abc /net
parentMerge branch 'kill_sk_protinfo' (diff)
downloadlinux-4fdeddfe04d0d0fdd4cc57bc25a02adf40dbb60a.tar.xz
linux-4fdeddfe04d0d0fdd4cc57bc25a02adf40dbb60a.zip
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 <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> Acked-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/dsa/slave.c2
1 files changed, 1 insertions, 1 deletions
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);