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

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

 



The warnings are  there since from the beginning.
Even before my fix.

There are two locks:
1.  pm8001_ha->lock
2. t->task_state_lock

regards
santosh

On Thu, Mar 1, 2012 at 7:52 PM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> 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


[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