]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: fix race with topology change timer
authorstephen hemminger <stephen@networkplumber.org>
Thu, 2 May 2013 14:23:28 +0000 (14:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 May 2013 20:08:58 +0000 (16:08 -0400)
commitf4fc1623f6a059342ffdac8a6f6b0a1039f4571e
tree03ffd894cf160fdd0f87e63a4136810cf6275e2b
parent4fddf3aa2cb0534b8dc363a322c8bdcf46cc309e
bridge: fix race with topology change timer

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>
net/bridge/br_stp_timer.c