[PATCH 3+/4] bridge: fix locking of set path cost
From: Stephen Hemminger <hidden>
Date: 2007-02-27 17:52:58
Also in:
bridge
From: Stephen Hemminger <hidden>
Date: 2007-02-27 17:52:58
Also in:
bridge
This change goes with earlier change to get rid of work queue for path cost. Now stp_set_path_cost does its own locking. This is to allow it to call br_path_cost() which calls ethtool interfaces (might sleep). Signed-off-by: Stephen Hemminger <redacted> --- net/bridge/br_ioctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
--- bridge.orig/net/bridge/br_ioctl.c 2007-02-27 09:46:15.000000000 -0800
+++ bridge/net/bridge/br_ioctl.c 2007-02-27 09:43:24.000000000 -0800@@ -291,12 +291,11 @@ if (!capable(CAP_NET_ADMIN)) return -EPERM; - spin_lock_bh(&br->lock); if ((p = br_get_port(br, args[1])) == NULL) ret = -EINVAL; else br_stp_set_path_cost(p, args[2]); - spin_unlock_bh(&br->lock); + return ret; }