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: <20110411230159.6727.91380.stgit@gitlad.jf.intel.com>
Date:	Mon, 11 Apr 2011 16:01:59 -0700
From:	Bruce Allan <bruce.w.allan@...el.com>
To:	netdev@...r.kernel.org
Subject: [net-next-2.6 PATCH] ethtool: time to blink provided in seconds not
	jiffies

When blinking for a duration set by the user, the value specified is in
seconds but it is used as the number of jiffies in the timeout after which
the Physical ID indicator is deactivated.  Fix by converting the timeout
to seconds.

Signed-off-by: Bruce Allan <bruce.w.allan@...el.com>
---

 net/core/ethtool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 704e176..43ef09f 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -1653,7 +1653,7 @@ static int ethtool_phys_id(struct net_device *dev, void __user *useraddr)
 	if (rc == 0) {
 		/* Driver will handle this itself */
 		schedule_timeout_interruptible(
-			id.data ? id.data : MAX_SCHEDULE_TIMEOUT);
+			id.data ? (id.data * HZ) : MAX_SCHEDULE_TIMEOUT);
 	} else {
 		/* Driver expects to be called periodically */
 		do {

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