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] [day] [month] [year] [list]
Date:	Wed, 30 May 2007 04:25:32 -0700
From:	"Seokmann Ju" <seokmann.ju@...gic.com>
To:	"Bill Nottingham" <notting@...hat.com>,
	<linux-scsi@...r.kernel.org>
Cc:	"Linux Driver" <Linux-Driver@...gic.com>,
	<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH RFC] qla2xxx: fix timeout in qla2x00_down_timeout

Thanks for finding. 
Acked-by: Seokmann Ju <seokmann.ju@...gic.com>

> -----Original Message-----
> From: Bill Nottingham [mailto:notting@...hat.com] 
> Sent: Wednesday, May 30, 2007 1:17 AM
> To: linux-scsi@...r.kernel.org
> Cc: Linux Driver; linux-kernel@...r.kernel.org
> Subject: [PATCH RFC] qla2xxx: fix timeout in qla2x00_down_timeout
> 
> iterations is unsigned, so it is impossible to get out of the 
> loop and return -ETIMEDOUT.
> 
> Signed-off-by: Bill Nottingham <notting@...hat.com>
> 
> ---
> 
> If the intention *is* to never fall out of the end of the 
> loop, ignore this, and just replace it with do {} while (1);.
> 
> --- drivers/scsi/qla2xxx/qla_os.c.foo	2007-05-30 
> 04:07:52.000000000 -0400
> +++ drivers/scsi/qla2xxx/qla_os.c	2007-05-30 
> 04:08:31.000000000 -0400
> @@ -2587,15 +2587,15 @@ qla2x00_down_timeout(struct semaphore *s
>  	unsigned int iterations = jiffies_to_msecs(timeout)/100;
>  
>  	do {
>  		if (!down_trylock(sema))
>  			return 0;
>  		if (msleep_interruptible(step))
>  			break;
> -	} while (--iterations >= 0);
> +	} while (--iterations > 0);
>  
>  	return -ETIMEDOUT;
>  }
>  
>  /* Firmware interface routines. */
>  
>  #define FW_BLOBS	5
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ