From: Stephen Hemminger Date: Thu, 26 Apr 2007 05:08:46 +0000 (-0700) Subject: [BRIDGE]: Missing rtnl. X-Git-Tag: v2.6.22-rc1~1128^2~48 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98486fa2f4894e2b01e325c659635596bdec1614;p=linux-2.6 [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 Signed-off-by: David S. Miller --- diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index 7ec0b76cdd..33c6c4a7c6 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, 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,