diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2010-03-05 16:03:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-07 18:31:12 -0500 |
commit | 10cc2b50eb4b01ca4dc014af2094d28b4ebe20d7 (patch) | |
tree | 3e9278a4dda2bd8ccb7e37ddf14344444834c0f7 /net/bridge | |
parent | 49f5fcfd4ac3df24aa66520e1c5f37db5dfa8c10 (diff) |
bridge: Fix RCU race in br_multicast_stop
Thanks to Paul McKenny for pointing out that it is incorrect to use
synchronize_rcu_bh to ensure that pending callbacks have completed.
Instead we should use rcu_barrier_bh.
Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_multicast.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index a1ffe1582c9a..12ce1eaa4f3e 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
@@ -1135,7 +1135,7 @@ void br_multicast_stop(struct net_bridge *br) | |||
1135 | 1135 | ||
1136 | if (mdb->old) { | 1136 | if (mdb->old) { |
1137 | spin_unlock_bh(&br->multicast_lock); | 1137 | spin_unlock_bh(&br->multicast_lock); |
1138 | synchronize_rcu_bh(); | 1138 | rcu_barrier_bh(); |
1139 | spin_lock_bh(&br->multicast_lock); | 1139 | spin_lock_bh(&br->multicast_lock); |
1140 | WARN_ON(mdb->old); | 1140 | WARN_ON(mdb->old); |
1141 | } | 1141 | } |