]> git.itanic.dy.fi Git - linux-stable/commit
bridge: fix race with topology change timer
authorstephen hemminger <stephen@networkplumber.org>
Thu, 2 May 2013 14:23:28 +0000 (14:23 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 May 2013 17:54:45 +0000 (10:54 -0700)
commit7157a527af680c157244db79f2d7f15d889f2ad1
tree45cbca37c379321fa60bcbdc12663373a42f96f4
parent074d34feb18f1439e13053d0869df368e8ea2107
bridge: fix race with topology change timer

[ Upstream commit 83401eb4990ff6af55aeed8f49681558544192e6 ]

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