bridge: fix hang on removal of bridge via netlink
authorstephen hemminger <shemminger@vyatta.com>
Thu, 6 Oct 2011 11:19:41 +0000 (11:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Oct 2011 03:24:16 +0000 (23:24 -0400)
commit1ce5cce895309862d2c35d922816adebe094fe4a
tree15e92f7f8f7a78843ec797bcd4b432979be111a7
parentae2a4583154a5b985ed4a81c6259c55bafe6d810
bridge: fix hang on removal of bridge via netlink

Need to cleanup bridge device timers and ports when being bridge
device is being removed via netlink.

This fixes the problem of observed when doing:
 ip link add br0 type bridge
 ip link set dev eth1 master br0
 ip link set br0 up
 ip link del br0

which would cause br0 to hang in unregister_netdev because
of leftover reference count.

Reported-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_if.c
net/bridge/br_netlink.c
net/bridge/br_private.h