aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-04-26 01:08:46 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:30:04 -0400
commit98486fa2f4894e2b01e325c659635596bdec1614 (patch)
tree50ec95d6b6dc050984610041415d07ccfc8f6014
parentc2886d6259b8faac4c05ffd9c3c401ac84478de0 (diff)
[BRIDGE]: Missing rtnl.
Writing to /sys/class/net/brX/bridge/stp_state causes a warning because RTNL is not held when call br_stp_if.c Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/bridge/br_sysfs_br.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c
index 7ec0b76cdd27..33c6c4a7c689 100644
--- a/net/bridge/br_sysfs_br.c
+++ b/net/bridge/br_sysfs_br.c
@@ -149,9 +149,11 @@ static ssize_t show_stp_state(struct device *d,
149 149
150static void set_stp_state(struct net_bridge *br, unsigned long val) 150static void set_stp_state(struct net_bridge *br, unsigned long val)
151{ 151{
152 rtnl_lock();
152 spin_unlock_bh(&br->lock); 153 spin_unlock_bh(&br->lock);
153 br_stp_set_enabled(br, val); 154 br_stp_set_enabled(br, val);
154 spin_lock_bh(&br->lock); 155 spin_lock_bh(&br->lock);
156 rtnl_unlock();
155} 157}
156 158
157static ssize_t store_stp_state(struct device *d, 159static ssize_t store_stp_state(struct device *d,