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]
Date:	Mon, 21 Mar 2011 10:02:59 +0900
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	roel.kluin@...il.com
Cc:	James.Bottomley@...e.de, linux-scsi@...r.kernel.org,
	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] osst: wrong index used in inner loop

On Sat, 19 Mar 2011 20:53:53 +0100
roel <roel.kluin@...il.com> wrote:

> Index i was already used in the outer loop.
> 
> Signed-off-by: Roel Kluin <roel.kluin@...il.com>
> ---
>  drivers/scsi/osst.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> I'm not sure if this is the right fix, maybe a break or return
> is missing?

What are you trying to fix with this patch?


> diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
> index 521e218..d6d6d89 100644
> --- a/drivers/scsi/osst.c
> +++ b/drivers/scsi/osst.c
> @@ -4702,8 +4702,9 @@ static int __os_scsi_tape_open(struct inode * inode, struct file * filp)
>  				STp->partition = STp->new_partition = 0;
>  				if (STp->can_partitions)
>  					STp->nbr_partitions = 1;  /* This guess will be updated later if necessary */
> -				for (i=0; i < ST_NBR_PARTITIONS; i++) {
> -					STps = &(STp->ps[i]);
> +				int j;
> +				for (j=0; j < ST_NBR_PARTITIONS; j++) {
> +					STps = &(STp->ps[j]);
>  					STps->rw = ST_IDLE;
>  					STps->eof = ST_NOEOF;
>  					STps->at_sm = 0;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
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