netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, bridge@linux-foundation.org
Subject: [PATCH 4/4] bridge: missing rtnl
Date: Wed, 25 Apr 2007 16:47:41 -0700	[thread overview]
Message-ID: <20070425234950.847694502@linux-foundation.org> (raw)
In-Reply-To: 20070425234737.727790594@linux-foundation.org

[-- Attachment #1: br-sysfs-rtnl.patch --]
[-- Type: text/plain, Size: 661 bytes --]

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 <shemminger@linux-foundation.org>

---
 net/bridge/br_sysfs_br.c |    2 ++
 1 file changed, 2 insertions(+)

--- bridge-2.6.22.orig/net/bridge/br_sysfs_br.c
+++ bridge-2.6.22/net/bridge/br_sysfs_br.c
@@ -149,9 +149,11 @@ static ssize_t show_stp_state(struct dev
 
 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,

-- 


  parent reply	other threads:[~2007-04-25 23:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-25 23:47 [PATCH 0/4] Bridge patches for 2.6.22 Stephen Hemminger
2007-04-25 23:47 ` [PATCH 1/4] bridge: don't change packet type Stephen Hemminger
2007-04-26  5:05   ` David Miller
2007-04-25 23:47 ` [PATCH 2/4] bridge: drop PAUSE frames Stephen Hemminger
2007-04-26  5:07   ` David Miller
2007-04-25 23:47 ` [PATCH 3/4] bridge: if no STP then forward all BPDUs Stephen Hemminger
2007-04-25 23:47 ` Stephen Hemminger [this message]
2007-04-26  5:08   ` [PATCH 4/4] bridge: missing rtnl 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=20070425234950.847694502@linux-foundation.org \
    --to=shemminger@linux-foundation.org \
    --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).