Re: [PATCH 06/11] qla4xxx: added srb referance counter

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

 



On 02/11/2010 05:54 PM, Mike Christie wrote:
It seems like you would want to do


Maybe one more fix.


qla4xxx_wait_for_hba_online()
spin_lock_irqsave(&ha->hardware_lock, flags);

srb = (struct srb *) cmd->SCp.ptr;
if (!srb)
/* raced while waiting for hba online */
return SUCCESS;

/* Get a reference to the sp and drop the lock.*/
sp_get(srb);
spin_unlock_irqrestore(&ha->hardware_lock, flags);
qla4xxx_abort_task()

From what I can tell, we used to call qla4xxx_srb_compl (and now do the final sp_put in the normal completion path) while holding the hardware_lock. If this is not the case then the loop in the eh abort patch is racey and my pseudo code above is too).

If I am right, then I think here we want to do

spin_lock_irqsave(&ha->hardware_lock, flags);
sp_put(ha, srb);

So it is consistent with the other code, and then I think we want to add a comment in sp_put() that we should be holing the hardware_lock when calling it.


sp_put(ha, srb)
spin_lock_irqsave(&ha->hardware_lock, flags);

qla4xxx_eh_wait_on_command(ha, cmd);
--
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