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: <20070828140530.14b8a036@laptopd505.fenrus.org>
Date:	Tue, 28 Aug 2007 14:05:30 -0700
From:	Arjan van de Ven <arjan@...radead.org>
To:	netdev@...r.kernel.org
Subject: make bnx2.c use msleep()

bnx2.c (incorrectly) sets current->state directly to
TASK_UNINTERRUPTIBLE, without going through set_task_state(). However
all the code wants to do is an msleep so just make it do that instead...

Signed-off-by: Arjan van de Ven <arjan@...ux.intel.com>

--- linux-2.6.23-rc2/drivers/net/bnx2.c.org	2007-08-28 13:59:03.000000000 -0700
+++ linux-2.6.23-rc2/drivers/net/bnx2.c	2007-08-28 13:59:33.000000000 -0700
@@ -3935,10 +3935,8 @@ bnx2_reset_chip(struct bnx2 *bp, u32 res
 		REG_WR(bp, BNX2_PCICFG_MISC_CONFIG, val);
 
 		if ((CHIP_ID(bp) == CHIP_ID_5706_A0) ||
-		    (CHIP_ID(bp) == CHIP_ID_5706_A1)) {
-			current->state = TASK_UNINTERRUPTIBLE;
-			schedule_timeout(HZ / 50);
-		}
+		    (CHIP_ID(bp) == CHIP_ID_5706_A1))
+			msleep(20);
 
 		/* Reset takes approximate 30 usec */
 		for (i = 0; i < 10; i++) {


-
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