RE: pm8001_hwi.c uldd_task - missing spin_lockirqsave?

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

 



> 
> The file drivers/scsi/pm8001/pm8001_hwi.c contains the piece of code
below,
> at
> the end of mpi_sata_completion() and  mpi_sata_event(), which appears
wrong.
> While the test is opposite, the executed branch does exactly the same. I
believe
> one of the branches should spin_lockirqsave instead? not 100% sure how to
fix
> this.
> 
> Roel
> 
> 	} else if (t->uldd_task) {
> 		spin_unlock_irqrestore(&t->task_state_lock, flags);
> 		pm8001_ccb_task_free(pm8001_ha, t, ccb, tag);
> 		mb();/* ditto */
> 		spin_unlock_irq(&pm8001_ha->lock);
> 		t->task_done(t);
> 		spin_lock_irq(&pm8001_ha->lock);
> 	} else if (!t->uldd_task) {
> 		spin_unlock_irqrestore(&t->task_state_lock, flags);
> 		pm8001_ccb_task_free(pm8001_ha, t, ccb, tag);
> 		mb();/*ditto*/
> 		spin_unlock_irq(&pm8001_ha->lock);
> 		t->task_done(t);
> 		spin_lock_irq(&pm8001_ha->lock);
> 	}
> --
[Jack Wang] Current mainline code all task->uldd_task is not null, so we can
remove the below branch. Not sure why you said should use spin_lock_irqsave.


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