From: Stephen Hemminger <shemminger@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, bridge@linux-foundation.org,
Srinivas Aji <Aji_Srinivas@emc.com>
Subject: [PATCH 3+/4] bridge: fix locking of set path cost
Date: Tue, 27 Feb 2007 09:52:51 -0800 [thread overview]
Message-ID: <20070227095251.0c20eebd@freekitty> (raw)
In-Reply-To: <20070221224255.790379091@linux-foundation.org>
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>
---
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;
}
next prev parent reply other threads:[~2007-02-27 17:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-21 22:41 [PATCH 0/4] bridge patches Stephen Hemminger
2007-02-21 22:41 ` [PATCH 1/4] bridge: get rid of miscdevice include Stephen Hemminger
2007-02-21 23:40 ` Marc.Obbad
2007-02-22 9:09 ` David Miller
2007-02-21 22:41 ` [PATCH 2/4] bridge: eliminate workqueue for carrier check Stephen Hemminger
2007-02-22 9:10 ` David Miller
2007-02-21 22:41 ` [PATCH 3/4] bridge: make path cost setting persistent Stephen Hemminger
2007-02-27 17:52 ` Stephen Hemminger [this message]
2007-02-27 17:56 ` [PATCH 3+/4] bridge: fix locking of set path cost David Miller
2007-02-21 22:41 ` [PATCH 4/4] bridge: add flush attribute Stephen Hemminger
2007-02-22 9:11 ` [PATCH 0/4] bridge patches David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070227095251.0c20eebd@freekitty \
--to=shemminger@linux-foundation.org \
--cc=Aji_Srinivas@emc.com \
--cc=bridge@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).