From: Stephen Hemminger <shemminger@vyatta•com>
To: "David S. Miller" <davem@davemloft•net>,
Herbert Xu <herbert@gondor•hengli.com.au>
Cc: netdev@vger•kernel.org
Subject: [PATCH net-next 2/4] bridge: multicast flood
Date: Tue, 27 Apr 2010 18:01:05 -0700 [thread overview]
Message-ID: <20100428010336.153753592@vyatta.com> (raw)
In-Reply-To: 20100428010103.386761596@vyatta.com
[-- Attachment #1: br-router-list-rcu.patch --]
[-- Type: text/plain, Size: 786 bytes --]
Fix unsafe usage of RCU. Would never work on Alpha SMP because
of lack of rcu_dereference()
Signed-off-by: Stephen Hemminger <shemminger@vyatta•com>
--- a/net/bridge/br_forward.c 2010-04-27 17:11:52.008626080 -0700
+++ b/net/bridge/br_forward.c 2010-04-27 17:23:46.388602995 -0700
@@ -216,7 +216,7 @@ static void br_multicast_flood(struct ne
prev = NULL;
- rp = br->router_list.first;
+ rp = rcu_dereference(br->router_list.first);
p = mdst ? mdst->ports : NULL;
while (p || rp) {
lport = p ? p->port : NULL;
@@ -233,7 +233,7 @@ static void br_multicast_flood(struct ne
if ((unsigned long)lport >= (unsigned long)port)
p = p->next;
if ((unsigned long)rport >= (unsigned long)port)
- rp = rp->next;
+ rp = rcu_dereference(rp->next);
}
if (!prev)
--
next prev parent reply other threads:[~2010-04-28 1:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-28 1:01 [PATCH net-next 0/4] Bridge IGMP cleanup and fixes Stephen Hemminger
2010-04-28 1:01 ` [PATCH net-next 1/4] bridge: simplify multicast_add_router Stephen Hemminger
2010-04-28 1:01 ` Stephen Hemminger [this message]
2010-04-28 1:01 ` [PATCH net-next 3/4] bridge: multicast port group RCU fix Stephen Hemminger
2010-04-28 3:07 ` Herbert Xu
2010-04-28 3:47 ` Stephen Hemminger
2010-04-28 1:01 ` [PATCH net-next 4/4] bridge: multicast_flood cleanup Stephen Hemminger
2010-04-28 1:14 ` [PATCH net-next 0/4] Bridge IGMP cleanup and fixes 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=20100428010336.153753592@vyatta.com \
--to=shemminger@vyatta$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=herbert@gondor$(echo .)hengli.com.au \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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