summaryrefslogtreecommitdiff
path: root/Documentation/gcov.txt
diff options
context:
space:
mode:
authorCurt Brune <curt@cumulusnetworks.com>2014-01-06 11:00:32 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-15 15:27:11 -0800
commit09e333b064c0f570051ec055d0098c6b6ce00850 (patch)
tree9cea95af111794dc2c29eddf7709b6d819be9e82 /Documentation/gcov.txt
parent5a5bf44e2b40d72ed94d031ebf43e3670b1d7646 (diff)
downloadlwn-09e333b064c0f570051ec055d0098c6b6ce00850.tar.gz
lwn-09e333b064c0f570051ec055d0098c6b6ce00850.zip
bridge: use spin_lock_bh() in br_multicast_set_hash_max
[ Upstream commit fe0d692bbc645786bce1a98439e548ae619269f5 ] br_multicast_set_hash_max() is called from process context in net/bridge/br_sysfs_br.c by the sysfs store_hash_max() function. br_multicast_set_hash_max() calls spin_lock(&br->multicast_lock), which can deadlock the CPU if a softirq that also tries to take the same lock interrupts br_multicast_set_hash_max() while the lock is held . This can happen quite easily when any of the bridge multicast timers expire, which try to take the same lock. The fix here is to use spin_lock_bh(), preventing other softirqs from executing on this CPU. Steps to reproduce: 1. Create a bridge with several interfaces (I used 4). 2. Set the "multicast query interval" to a low number, like 2. 3. Enable the bridge as a multicast querier. 4. Repeatedly set the bridge hash_max parameter via sysfs. # brctl addbr br0 # brctl addif br0 eth1 eth2 eth3 eth4 # brctl setmcqi br0 2 # brctl setmcquerier br0 1 # while true ; do echo 4096 > /sys/class/net/br0/bridge/hash_max; done Signed-off-by: Curt Brune <curt@cumulusnetworks.com> Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/gcov.txt')
0 files changed, 0 insertions, 0 deletions