From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Ben Hutchings <bhutchings@solarflare.com>
Subject: [ 1/9 ] sfc: Disable soft interrupt handling during efx_device_detach_sync()
Date: Thu, 11 Apr 2013 19:11:50 -0400 [thread overview]
Message-ID: <20130411231619.979911521@goodmis.org> (raw)
In-Reply-To: <20130411231149.302144972@goodmis.org>
[-- Attachment #1: 0001-sfc-Disable-soft-interrupt-handling-during-efx_devic.patch --]
[-- Type: text/plain, Size: 1259 bytes --]
From: Ben Hutchings <bhutchings@solarflare.com>
[ 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: Steven Rostedt <rostedt@goodmis.org>
---
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_device_detach(dev);
- netif_tx_unlock(dev);
+ netif_tx_unlock_bh(dev);
}
#endif /* EFX_EFX_H */
--
1.7.10.4
next prev parent reply other threads:[~2013-04-11 23:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 23:11 [ 0/9 ] 3.6.11.2-stable review (update) Steven Rostedt
2013-04-11 23:11 ` Steven Rostedt [this message]
2013-04-11 23:11 ` [ 2/9 ] sfc: Really disable flow control while flushing Steven Rostedt
2013-04-11 23:11 ` [ 3/9 ] sfc: Convert firmware subtypes to native byte order in efx_mcdi_get_board_cfg() Steven Rostedt
2013-04-11 23:11 ` [ 4/9 ] sfc: Add parentheses around use of bitfield macro arguments Steven Rostedt
2013-04-11 23:11 ` [ 5/9 ] sfc: Fix MCDI structure field lookup Steven Rostedt
2013-04-11 23:11 ` [ 6/9 ] sfc: Avoid generating over-length MC_CMD_FLUSH_RX_QUEUES request Steven Rostedt
2013-04-11 23:11 ` [ 7/9 ] sfc: Work-around flush timeout when flushes have completed Steven Rostedt
2013-04-11 23:11 ` [ 8/9 ] sfc: Correctly initialise reset_method in siena_test_chip() Steven Rostedt
2013-04-11 23:11 ` [ 9/9 ] sfc: Fix timekeeping in efx_mcdi_poll() Steven Rostedt
2013-04-11 23:21 ` [ 0/9 ] 3.6.11.2-stable review (update) Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130411231619.979911521@goodmis.org \
--to=rostedt@goodmis.org \
--cc=bhutchings@solarflare.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome