RE: [SCSI] pm8001: Fix bogus interrupt state flag issue.

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

 



Dear Dan and Santosh Nayak,

I change task_state_lock to spin_lock is OK. Please feel free to send patch
out.

Thanks.

Jack
> 
> Hello Santosh Nayak,
> 
> The patch bdaefbf580cd: "[SCSI] pm8001: Fix bogus interrupt state
> flag issue." from Feb 26, 2012, leads to the following warning:
> drivers/scsi/pm8001/pm8001_hwi.c:2400 mpi_sata_completion()
> 	 error: double unlock 'irq:'
> 
> 
>         } else if (t->uldd_task) {
> -               spin_unlock_irqrestore(&t->task_state_lock, flags);
> +               spin_unlock_irq(&t->task_state_lock);
>                 ^^^^^^^^^^^^^^^
>                 pm8001_ccb_task_free(pm8001_ha, t, ccb, tag);
>                 mb();/* ditto */
> -               spin_unlock_irqrestore(&pm8001_ha->lock, flags);
> +               spin_unlock_irq(&pm8001_ha->lock);
>                 ^^^^^^^^^^^^^^^
> It doesn't make sense to enable IRQs twice.  I'm not sure if it should
> be the first or second unlock which enables them.
> 
>                 t->task_done(t);
> -               spin_lock_irqsave(&pm8001_ha->lock, flags);
> +               spin_lock_irq(&pm8001_ha->lock);
>         } else if (!t->uldd_task) {
> -               spin_unlock_irqrestore(&t->task_state_lock, flags);
> +               spin_unlock_irq(&t->task_state_lock);
>                 ^^^^^^^^^^^^^^^
>                 pm8001_ccb_task_free(pm8001_ha, t, ccb, tag);
>                 mb();/*ditto*/
> -               spin_unlock_irqrestore(&pm8001_ha->lock, flags);
> +               spin_unlock_irq(&pm8001_ha->lock);
>                 ^^^^^^^^^^^^^^^
> Same thing again.
> 
>                 t->task_done(t);
> -               spin_lock_irqsave(&pm8001_ha->lock, flags);
> +               spin_lock_irq(&pm8001_ha->lock);
>         }
> 
> regards,
> dan carpenter
> 
> --
> 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

--
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