mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
bridge: fix race with topology change timer
[ Upstream commit 83401eb499
]
A bridge should only send topology change notice if it is not
the root bridge. It is possible for message age timer to elect itself
as a new root bridge, and still have a topology change timer running
but waiting for bridge lock on other CPU.
Solve the race by checking if we are root bridge before continuing.
This was the root cause of the cases where br_send_tcn_bpdu would OOPS.
Reported-by: JerryKang <jerry.kang@samsung.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
074d34feb1
commit
7157a527af
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ static void br_tcn_timer_expired(unsigned long arg)
|
|||
|
||||
br_debug(br, "tcn timer expired\n");
|
||||
spin_lock(&br->lock);
|
||||
if (br->dev->flags & IFF_UP) {
|
||||
if (!br_is_root_bridge(br) && (br->dev->flags & IFF_UP)) {
|
||||
br_transmit_tcn(br);
|
||||
|
||||
mod_timer(&br->tcn_timer,jiffies + br->bridge_hello_time);
|
||||
|
|
Loading…
Reference in a new issue