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: <1374957354-10142-1-git-send-email-sam8641@gmail.com>
Date:	Sat, 27 Jul 2013 15:35:54 -0500
From:	Samuel Williams <sam8641@...il.com>
To:	mlindner@...vell.com
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Samuel Williams <sam8641@...il.com>
Subject: [PATCH] sky2: detect and prevent kernel panic from a possible faulty hardware

A possible faulty hardware might interrupt with a status of 0xffffffff which
may kernel panic if sky2 driver tries to handle it. Detecting this problem
may avoid kernel panic.

Signed-off-by: Samuel Williams <sam8641@...il.com>
---
 drivers/net/ethernet/marvell/sky2.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index e09a8c6..43fe2f3 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -3049,8 +3049,17 @@ static int sky2_poll(struct napi_struct *napi, int work_limit)
 	int work_done = 0;
 	u16 idx;
 
-	if (unlikely(status & Y2_IS_ERROR))
+	if (unlikely(status & Y2_IS_ERROR)) {
+		if (status == 0xFFFFFFFF) {
+			dev_err(&hw->pdev->dev,
+				"fatal hardware inturrupt error\n");
+			napi_complete(napi);
+			napi_disable(&hw->napi);
+			return 0;
+		}
 		sky2_err_intr(hw, status);
+	}
+
 
 	if (status & Y2_IS_IRQ_PHY1)
 		sky2_phy_intr(hw, 0);
-- 
1.7.10.4

--
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