On Tue, Aug 14, 2007 at 02:11:05PM +0100, Stephen Hemminger wrote:
Bridge locking for /sys/class/net/br0/bridge/stp_enabled
was wrong. Another bug in bridge utilities makes it such that
this interface, meant it wasn't being used. The locking needs
to be removed from set_stp_state(), the lock is already acquired
down in br_stp_start()/br_stp_stop.
The 'locking' in set_stp_state() is actually dropping the lock
around the br_stp_set_enabled() invocation, not acquiring it:
quoted hunk ↗ jump to hunk
@@ -150,9 +150,7 @@ static ssize_t show_stp_state(struct dev
static void set_stp_state(struct net_bridge *br, unsigned long val)
{
rtnl_lock();
- spin_unlock_bh(&br->lock);
br_stp_set_enabled(br, val);
- spin_lock_bh(&br->lock);
rtnl_unlock();
}