aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAndrey Vagin <avagin@openvz.org>2011-11-10 00:48:03 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-14 00:38:53 -0500
commitef5e0d8237287db3a12d84f08fb2483d7a30a943 (patch)
tree788e6c6546b4e3af7b01e0863ef4f2d8808e50ef /net
parent731abb9cb27aef6013ce60808a04e04a545f3f4e (diff)
bridge: Fix potential deadlock on br->multicast_lock
multicast_lock is taken in softirq context, so we should use spin_lock_bh() in userspace. call-chain in softirq context: run_timer_softirq() br_multicast_query_expired() call-chain in userspace: sysfs_write_file() store_multicast_snooping() br_multicast_toggle() Signed-off-by: Andrew Vagin <avagin@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/bridge/br_multicast.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 995cbe0ac0b2..2eefe275b338 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1770,7 +1770,7 @@ int br_multicast_toggle(struct net_bridge *br, unsigned long val)
1770 int err = 0; 1770 int err = 0;
1771 struct net_bridge_mdb_htable *mdb; 1771 struct net_bridge_mdb_htable *mdb;
1772 1772
1773 spin_lock(&br->multicast_lock); 1773 spin_lock_bh(&br->multicast_lock);
1774 if (br->multicast_disabled == !val) 1774 if (br->multicast_disabled == !val)
1775 goto unlock; 1775 goto unlock;
1776 1776
@@ -1806,7 +1806,7 @@ rollback:
1806 } 1806 }
1807 1807
1808unlock: 1808unlock:
1809 spin_unlock(&br->multicast_lock); 1809 spin_unlock_bh(&br->multicast_lock);
1810 1810
1811 return err; 1811 return err;
1812} 1812}