[PATCH 3+/4] bridge: fix locking of set path cost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxx>
---
 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;
 	}
 
_______________________________________________
Bridge mailing list
Bridge@xxxxxxxxxxxxxx
https://lists.osdl.org/mailman/listinfo/bridge


[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux