Re: ide_release_lock: bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[ Background for linux-ide: ide_release_lock() spits out lots of

    ide_release_lock: bug

  warnings on Atari Falcon ]

On Fri, 27 Jun 2008, Michael Schmitz wrote:
> The following patch does, indeed, fix the ide_release_lock imbalance. No more
> warnings.
> 
> --- drivers/ide/ide-io.c.orig	2008-06-27 20:11:42.000000000 +1200
> +++ drivers/ide/ide-io.c	2008-06-27 20:32:50.000000000 +1200
> @@ -1075,14 +1075,13 @@
>  	ide_startstop_t	startstop;
>  	int             loops = 0;
> 
> -	/* for atari only: POSSIBLY BROKEN HERE(?) */
> -	ide_get_lock(ide_intr, hwgroup);
> -
>  	/* caller must own ide_lock */
>  	BUG_ON(!irqs_disabled());
> 
>  	while (!hwgroup->busy) {
>  		hwgroup->busy = 1;
> +		/* for atari only */
> +		ide_get_lock(ide_intr, hwgroup);
>  		drive = choose_drive(hwgroup);
>  		if (drive == NULL) {
>  			int sleeping = 0;
> 
> Signed-off-by: <schmitz@xxxxxxxxxxxxxxxxxxxxxxxxxx>

> > We release the lock just before hwgroup->busy is cleared, so it should be
> > logical to get hold of the lock just after hwgroup->busy was set, no?

If hwgroup->busy serves a similar purpose to falconide_intr_lock, what about
moving the setting/clearing of hwgroup->busy into ide_{get,release}_lock()
(and possibly renaming ide_{get,release}_lock() to e.g.
ide_hwgroup_{set,clear}_busy())?

What about the other places where hwgroup->busy is set/cleared?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux