[Bridge] [PATCH 1/1] bridge/br_multicast: use spin_lock_bh() in br_multicast_set_hash_max()

Stephen Hemminger stephen at networkplumber.org
Mon Dec 30 00:53:30 UTC 2013


On Sat, 28 Dec 2013 14:37:32 -0800
Curt Brune <curt at cumulusnetworks.com> wrote:

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

Running lockdep should catch these kind of things without having
to do stress tests.



More information about the Bridge mailing list