mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-06 02:39:06 -05:00
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
49f5fcfd4a
commit
10cc2b50eb
1 changed files with 1 additions and 1 deletions
|
|
@ -1135,7 +1135,7 @@ void br_multicast_stop(struct net_bridge *br)
|
|||
|
||||
if (mdb->old) {
|
||||
spin_unlock_bh(&br->multicast_lock);
|
||||
synchronize_rcu_bh();
|
||||
rcu_barrier_bh();
|
||||
spin_lock_bh(&br->multicast_lock);
|
||||
WARN_ON(mdb->old);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue