netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] dsa: fix promiscuity leak on slave dev open error
@ 2015-06-25 13:50 giladb
  2015-06-26 15:04 ` Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: giladb @ 2015-06-25 13:50 UTC (permalink / raw)
  To: davem
  Cc: netdev, Gilad Ben-Yossef, Gilad Ben-Yossef, Florian Fainelli,
	Guenter Roeck, Andrew Lunn, Scott Feldman

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>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH net] dsa: fix promiscuity leak on slave dev open error
@ 2015-06-25 13:32 Gilad Ben-Yossef
  0 siblings, 0 replies; 7+ messages in thread
From: Gilad Ben-Yossef @ 2015-06-25 13:32 UTC (permalink / raw)
  To: davem
  Cc: netdev, Gilad Ben-Yossef, Florian Fainelli, Guenter Roeck,
	Andrew Lunn, Scott Feldman

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>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-06-28 23:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25 13:50 [PATCH net] dsa: fix promiscuity leak on slave dev open error giladb
2015-06-26 15:04 ` Andrew Lunn
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

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).