aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-02-27 12:55:07 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-28 12:42:12 -0500
commit6548cda289b549ed60c35f16a0051609aeee2fd0 (patch)
tree97b30b8ea7e9cd621195d3de57ca182dd5f04d60 /net/bridge
parentaa6e4a96e7589948fe770744f7bb4f0f743dddaa (diff)
[BRIDGE]: Fix locking of set path cost.
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 <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_ioctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c
index 3ab153d3c508..147015fe5c75 100644
--- a/net/bridge/br_ioctl.c
+++ b/net/bridge/br_ioctl.c
@@ -291,12 +291,11 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
291 if (!capable(CAP_NET_ADMIN)) 291 if (!capable(CAP_NET_ADMIN))
292 return -EPERM; 292 return -EPERM;
293 293
294 spin_lock_bh(&br->lock);
295 if ((p = br_get_port(br, args[1])) == NULL) 294 if ((p = br_get_port(br, args[1])) == NULL)
296 ret = -EINVAL; 295 ret = -EINVAL;
297 else 296 else
298 br_stp_set_path_cost(p, args[2]); 297 br_stp_set_path_cost(p, args[2]);
299 spin_unlock_bh(&br->lock); 298
300 return ret; 299 return ret;
301 } 300 }
302 301