Re: [PATCH] libiscsi: ensure session spin lock usage consistent

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

 



On 02/07/2018 04:41 PM, Mike Christie wrote:
>  
>>  static int iscsi_exec_task_mgmt_fn(struct iscsi_conn *conn,
>> @@ -1908,7 +1908,7 @@ static enum blk_eh_timer_return iscsi_eh_cmd_timed_out(struct scsi_cmnd *sc)
>>  
>>  	ISCSI_DBG_EH(session, "scsi cmd %p timedout\n", sc);
>>  
>> -	spin_lock(&session->lock);
>> +	spin_lock_bh(&session->lock);
>>  	task = (struct iscsi_task *)sc->SCp.ptr;
>>  	if (!task) {
>>  		/*
>> @@ -2022,7 +2022,7 @@ static enum blk_eh_timer_return iscsi_eh_cmd_timed_out(struct scsi_cmnd *sc)
>>  done:
>>  	if (task)
>>  		task->last_timeout = jiffies;
>> -	spin_unlock(&session->lock);
>> +	spin_unlock_bh(&session->lock);
>>  	ISCSI_DBG_EH(session, "return %s\n", rc == BLK_EH_RESET_TIMER ?
>>  		     "timer reset" : "nh");
>>  	return rc;

I guess you want this chunk too. It does not now, but someone could add
a blk_abort_request call that ends up calling into the driver.




[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