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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <499E6F18.4080503@gmail.com>
Date:	Fri, 20 Feb 2009 09:51:36 +0100
From:	Roel Kluin <roel.kluin@...il.com>
To:	David Miller <davem@...emloft.net>
CC:	steve.glendinning@...c.com, netdev@...r.kernel.org,
	akpm@...ux-foundation.org
Subject: Re: [PATCH] SMSC: timeout reaches -1

David Miller wrote:
> From: Roel Kluin <roel.kluin@...il.com>
> Date: Mon, 16 Feb 2009 11:21:33 +0100
> 
>> With a postfix decrement timeouts will reach -1 rather than 0, so
>> the error path does not appear.
>>
>> Signed-off-by: Roel Kluin <roel.kluin@...il.com>
> 
> Steve Glendinning submitted the smsc9420 side of this patch,
> please resubmit this with only the smsc911x.c part present.
> 
> Thanks.
> 
ok, here:

--------------------------->8-------------8<------------------------------
With a postfix decrement timeouts will reach -1 rather than 0, so
the error path does not appear.

Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index 783c1a7..9a78dae 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -1624,7 +1624,7 @@ static int smsc911x_eeprom_send_cmd(struct smsc911x_data *pdata, u32 op)
 	do {
 		msleep(1);
 		e2cmd = smsc911x_reg_read(pdata, E2P_CMD);
-	} while ((e2cmd & E2P_CMD_EPC_BUSY_) && (timeout--));
+	} while ((e2cmd & E2P_CMD_EPC_BUSY_) && (--timeout));
 
 	if (!timeout) {
 		SMSC_TRACE(DRV, "TIMED OUT");
--
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