Re: [PATCH] qla2xxx: spin_unlock_irq in IRQ context

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

 



On Tue, 2007-01-09 at 14:35 +0900, Hisashi Hifumi wrote:
> -       spin_unlock_irq(&ha->hardware_lock);
> +       if (in_irq())
> +               spin_unlock(&ha->hardware_lock);
> +       else
> +               spin_unlock_irq(&ha->hardware_lock);
> + 

Really, no!

If the function can be called with interrupts disabled as well as
enabled, then the spin_lock_irq needs to become a spin_lock_irqsave()
which is the correct API for this case.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux