Skip to content

Commit

Permalink
dsa: fix promiscuity leak on slave dev open error
Browse files Browse the repository at this point in the history
DSA master netdev promiscuity counter was not being properly
decremented on slave device open error path.

Signed-off-by: Gilad Ben-Yossef <[email protected]>
CC: Gilad Ben-Yossef <[email protected]>
CC: David S. Miller <[email protected]>
CC: Florian Fainelli <[email protected]>
CC: Guenter Roeck <[email protected]>
CC: Andrew Lunn <[email protected]>
CC: Scott Feldman <[email protected]>
Acked-by: Andrew Lunn <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
gby authored and davem330 committed Jun 28, 2015
1 parent 14e28b1 commit 4fdeddf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4fdeddf

Please sign in to comment.