netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Andrew Morton <akpm@linux-foundation.org>,
	"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, bridge@linux-foundation.org
Subject: Re: BUG: when using 'brctl stp'
Date: Tue, 14 Aug 2007 14:11:05 +0100	[thread overview]
Message-ID: <20070814141105.0a4b8dde@oldman.hamilton.local> (raw)
In-Reply-To: <20070812012037.0195b610.akpm@linux-foundation.org>

Bridge locking for /sys/class/net/br0/bridge/stp_enabled
was wrong.  Another bug in bridge utilities makes it such that
this interface, meant it wasn't being used.  The locking needs to be removed
from set_stp_state(), the lock is already acquired down in
br_stp_start()/br_stp_stop.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>


--- a/net/bridge/br_sysfs_br.c	2007-07-16 14:24:18.000000000 +0100
+++ b/net/bridge/br_sysfs_br.c	2007-08-14 13:44:23.000000000 +0100
@@ -150,9 +150,7 @@ 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();
 }
 

  parent reply	other threads:[~2007-08-14 13:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10 22:15 BUG: when using 'brctl stp' Daniel K.
     [not found] ` <20070812012037.0195b610.akpm@linux-foundation.org>
2007-08-14 13:11   ` Stephen Hemminger [this message]
2007-08-14 13:18     ` Lennert Buytenhek
2007-08-14 13:50       ` [PATCH] bridge: sysfs locking fix Stephen Hemminger
2007-08-14 20:21         ` David Miller
2007-08-24  8:18         ` Daniel Lezcano

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=20070814141105.0a4b8dde@oldman.hamilton.local \
    --to=shemminger@linux-foundation.org \
    --cc=akpm@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).