[ 3.5.y.z extended stable ] Patch "sfc: Disable soft interrupt handling during" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Mon Mar 25 18:03:51 UTC 2013

This is a note to let you know that I have just added a patch titled

    sfc: Disable soft interrupt handling during

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:


If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



>From a34cc86f7a6d4af09075de61479103c7a8a4e12c Mon Sep 17 00:00:00 2001
From: Ben Hutchings <bhutchings at solarflare.com>
Date: Tue, 5 Mar 2013 01:03:47 +0000
Subject: [PATCH] sfc: Disable soft interrupt handling during

commit 35205b211c8d17a8a0b5e8926cb7c73e9a7ef1ad upstream.

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 at solarflare.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
 drivers/net/ethernet/sfc/efx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/sfc/efx.h b/drivers/net/ethernet/sfc/efx.h
index 320cf7b..7db0e5b 100644
--- a/drivers/net/ethernet/sfc/efx.h
+++ b/drivers/net/ethernet/sfc/efx.h
@@ -170,9 +170,9 @@ static inline void efx_device_detach_sync(struct efx_nic *efx)
 	 * TX scheduler is stopped when we're done and before
 	 * netif_device_present() becomes false.
-	netif_tx_lock(dev);
+	netif_tx_lock_bh(dev);
-	netif_tx_unlock(dev);
+	netif_tx_unlock_bh(dev);

 #endif /* EFX_EFX_H */

More information about the kernel-team mailing list