netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/4] hisax: timeout off by one in waitrecmsg()
@ 2010-02-02 22:43 akpm
  2010-02-04  4:17 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2010-02-02 22:43 UTC (permalink / raw)
  To: isdn; +Cc: netdev, akpm, roel.kluin

From: Roel Kluin <roel.kluin@gmail.com>

With `while (timeout++ < maxdelay)' timeout reaches maxdelay + 1 after the
loop This is probably unlikely a problem in practice.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/isdn/hisax/isar.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/isdn/hisax/isar.c~hisax-timeout-off-by-one-in-waitrecmsg drivers/isdn/hisax/isar.c
--- a/drivers/isdn/hisax/isar.c~hisax-timeout-off-by-one-in-waitrecmsg
+++ a/drivers/isdn/hisax/isar.c
@@ -138,7 +138,7 @@ waitrecmsg(struct IsdnCardState *cs, u_c
 	while((!(cs->BC_Read_Reg(cs, 0, ISAR_IRQBIT) & ISAR_IRQSTA)) &&
 		(timeout++ < maxdelay))
 		udelay(1);
-	if (timeout >= maxdelay) {
+	if (timeout > maxdelay) {
 		printk(KERN_WARNING"isar recmsg IRQSTA timeout\n");
 		return(0);
 	}
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 1/4] hisax: timeout off by one in waitrecmsg()
  2010-02-02 22:43 [patch 1/4] hisax: timeout off by one in waitrecmsg() akpm
@ 2010-02-04  4:17 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-02-04  4:17 UTC (permalink / raw)
  To: akpm; +Cc: isdn, netdev, roel.kluin

From: akpm@linux-foundation.org
Date: Tue, 02 Feb 2010 14:43:44 -0800

> From: Roel Kluin <roel.kluin@gmail.com>
> 
> With `while (timeout++ < maxdelay)' timeout reaches maxdelay + 1 after the
> loop This is probably unlikely a problem in practice.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> Cc: Karsten Keil <isdn@linux-pingi.de>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-04  4:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-02 22:43 [patch 1/4] hisax: timeout off by one in waitrecmsg() akpm
2010-02-04  4:17 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).