lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200906051704.25753.adetsch@br.ibm.com>
Date:	Fri, 5 Jun 2009 17:04:25 -0300
From:	Andre Detsch <adetsch@...ibm.com>
To:	netdev@...r.kernel.org, e1000-devel@...ts.sourceforge.net
Subject: [PATCH] e100: Fix napi_enable BUG_ON when recovering from EEH error

BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)) was being hit
during e100 EEH recovery. The problem source was a napi_enable
call being made during e100_io_error_detected. Napi should remain
disabled after e100_down, and only be reenabled when the interface
is recovered.

This patch also updates e100_io_error_detected in order to make
it similar to the current versions of the error_detected callback
in drivers such as e1000e and ixgbe.

Signed-off-by: Andre Detsch <adetsch@...ibm.com>
---
 drivers/net/e100.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 0f9ee13..0c37dd9 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2822,12 +2822,13 @@ static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, pci_channel
 	struct net_device *netdev = pci_get_drvdata(pdev);
 	struct nic *nic = netdev_priv(netdev);
 
-	/* Similar to calling e100_down(), but avoids adapter I/O. */
-	e100_close(netdev);
-
-	/* Detach; put netif into a state similar to hotplug unplug. */
-	napi_enable(&nic->napi);
 	netif_device_detach(netdev);
+
+	if (state == pci_channel_io_perm_failure)
+		return PCI_ERS_RESULT_DISCONNECT;
+
+	if (netif_running(netdev))
+		e100_down(nic);
 	pci_disable_device(pdev);
 
 	/* Request a slot reset. */
-- 
1.6.0.2

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ