提交 98486fa2 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

[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: NStephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c2886d62
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册