Re: [PATCH] qla2xxx: sleep while IRQ disabled fix in eh_abort

James Bottomley
2004-04-01T15:05:25Z

On Thu, 2004-04-01 at 01:17, Andrew Vasquez wrote:
> Attached is a patch which fixes a problem in qla2xxx_eh_abort() where
> we incorrect use spin_unlock() before calling qla2x00_abort_command()
> - which can of course sleep.

Well, actually, sleeping with interrupts disabled is only a minor bug.
Assuming they'll be disabled when you return from a sleep is the major
bug because if you take the host lock again without disabling
interrupts, you'll deadlock on a SCSI interrupt.

Regardless, this patch doesn't look right. Flags contains interrupt
state. If you actually go around the for loop, you set the state
unconditionally to disabled because of the

spin_lock_irq(ha->host->host_lock);
spin_lock_irqsave(&ha->hardware_lock, flags);

James