]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sfc: Disable soft interrupt handling during efx_device_detach_sync()
authorBen Hutchings <bhutchings@solarflare.com>
Tue, 5 Mar 2013 01:03:47 +0000 (01:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Mar 2013 19:12:01 +0000 (12:12 -0700)
commit70a3336df60074b29ac3b546d8fccfbcf7831e95
tree36244b80305c3e89cd34f56e1b09b9e70158eaeb
parentbea3099eb4f3f73cc2c311d39ef374eb6aa06f88
sfc: Disable soft interrupt handling during efx_device_detach_sync()

[ Upstream commit 35205b211c8d17a8a0b5e8926cb7c73e9a7ef1ad ]

efx_device_detach_sync() locks all TX queues before marking the device
detached and thus disabling further TX scheduling.  But it can still
be interrupted by TX completions which then result in TX scheduling in
soft interrupt context.  This will deadlock when it tries to acquire
a TX queue lock that efx_device_detach_sync() already acquired.

To avoid deadlock, we must use netif_tx_{,un}lock_bh().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/sfc/efx.h