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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 16 Jun 2007 00:45:36 +0200
From:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To:	Masatake YAMATO <jet@...e.org>
Cc:	cebbert@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] never called printk statement in ide-taskfile.c::wait_drive_not_busy


Hi,

On Tuesday 05 June 2007, Masatake YAMATO wrote:
> > On 06/04/2007 10:21 PM, Masatake YAMATO wrote:
> > > diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
> > > index 30175c7..5e05311 100644
> > > --- a/drivers/ide/ide-taskfile.c
> > > +++ b/drivers/ide/ide-taskfile.c
> > > @@ -249,7 +249,7 @@ static u8 wait_drive_not_busy(ide_drive_t *drive)
> > >  	while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--)
> > >  		udelay(10);
> > >  
> > > -	if (!retries)
> > > +	if (retries < 0)
> > 
> > 	if (stat & BUSY_STAT)
> > 
> > >  		printk(KERN_ERR "%s: drive still BUSY!\n", drive->name);
> > >  
> 
> Oh, yes.
> Giving `retries' both roles: loop counter and condition flag for logging
> may not good.
> 
> 
>     for (retries = 0; retries < 100; retries++)
>     {
> 	    if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT)
> 	       break;
> 
> 	    udelay(10);
>     }
> 
> 
>     if (stat & BUSY_STAT)
> 	    printk(KERN_ERR "%s: drive still BUSY!\n", drive->name);

Please re-submit this fix in the form of a patch so I can merge it.

Thanks,
Bart
-
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