Skip to content

Commit

Permalink
[BRIDGE]: Missing rtnl.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Apr 26, 2007
1 parent c2886d6 commit 98486fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/bridge/br_sysfs_br.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,11 @@ static ssize_t show_stp_state(struct device *d,

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();
}

static ssize_t store_stp_state(struct device *d,
Expand Down

0 comments on commit 98486fa

Please sign in to comment.