From: Daniel Lezcano Date: Wed, 20 Feb 2008 08:21:47 +0000 (-0800) Subject: veth: fix dev refcount race X-Git-Tag: v2.6.25-rc3~9^2~24 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c15853f2c1c9baaa27bbc494cd183be96f6d9bb9;p=pandora-kernel.git veth: fix dev refcount race When deleting the veth driver, veth_close calls netif_carrier_off for the two extremities of the network device. netif_carrier_off on the peer device will fire an event and hold a reference on the peer device. Just after, the peer is unregistered taking the rtnl_lock while the linkwatch_event is scheduled. If __linkwatch_run_queue does not occurs before the unregistering, unregister_netdevice will wait for the dev refcount to reach zero holding the rtnl_lock and linkwatch_event will wait for the rtnl_lock and hold the dev refcount. Signed-off-by: Daniel Lezcano Signed-off-by: David S. Miller --- Reading git-diff-tree failed