From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: David Christensen <drc@linux.vnet.ibm.com>,
Michael Chan <michael.chan@broadcom.com>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.4 19/40] tg3: driver sleeps indefinitely when EEH errors exceed eeh_max_freezes
Date: Wed, 1 Jul 2020 21:23:40 -0400 [thread overview]
Message-ID: <20200702012402.2701121-19-sashal@kernel.org> (raw)
In-Reply-To: <20200702012402.2701121-1-sashal@kernel.org>
From: David Christensen <drc@linux.vnet.ibm.com>
[ Upstream commit 3a2656a211caf35e56afc9425e6e518fa52f7fbc ]
The driver function tg3_io_error_detected() calls napi_disable twice,
without an intervening napi_enable, when the number of EEH errors exceeds
eeh_max_freezes, resulting in an indefinite sleep while holding rtnl_lock.
Add check for pcierr_recovery which skips code already executed for the
"Frozen" state.
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/broadcom/tg3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index ca3aa1250dd13..e12ba81288e64 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -18176,8 +18176,8 @@ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,
rtnl_lock();
- /* We probably don't have netdev yet */
- if (!netdev || !netif_running(netdev))
+ /* Could be second call or maybe we don't have netdev yet */
+ if (!netdev || tp->pcierr_recovery || !netif_running(netdev))
goto done;
/* We needn't recover from permanent error */
--
2.25.1
next prev parent reply other threads:[~2020-07-02 1:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200702012402.2701121-1-sashal@kernel.org>
2020-07-02 1:23 ` [PATCH AUTOSEL 5.4 12/40] net: usb: ax88179_178a: fix packet alignment padding Sasha Levin
2020-07-02 1:23 ` [PATCH AUTOSEL 5.4 17/40] net: ethernet: mvneta: Fix Serdes configuration for SoCs without comphy Sasha Levin
2020-07-02 1:23 ` [PATCH AUTOSEL 5.4 18/40] net: ethernet: mvneta: Add 2500BaseX support " Sasha Levin
2020-07-02 1:23 ` Sasha Levin [this message]
2020-07-02 1:23 ` [PATCH AUTOSEL 5.4 20/40] ixgbe: protect ring accesses with READ- and WRITE_ONCE Sasha Levin
2020-07-02 1:23 ` [PATCH AUTOSEL 5.4 21/40] i40e: " Sasha Levin
2020-07-02 1:23 ` [PATCH AUTOSEL 5.4 22/40] ibmvnic: continue to init in CRQ reset returns H_CLOSED Sasha Levin
2020-07-02 1:23 ` [PATCH AUTOSEL 5.4 24/40] usbnet: smsc95xx: Fix use-after-free after removal Sasha Levin
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=20200702012402.2701121-19-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=drc@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).