Re: [PATCH v2 3/3] qla2xxx: Fix NVME cmd and LS cmd timeout race condition

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

 



On 6/18/19 11:10 AM, Himanshu Madhani wrote:
+out:
+	/* kref_get was done before work was schedule. */
+	if (sp->type == SRB_NVME_CMD)
+		kref_put(&sp->cmd_kref, qla_nvme_release_fcp_cmd_kref);
+	else if (sp->type == SRB_NVME_LS)
+		kref_put(&sp->cmd_kref, qla_nvme_release_ls_cmd_kref);

Hi Himanshu and Quinn,

The above code looks ugly to me. I would prefer that the qla_nvme_release_fcp_cmd_kref() and qla_nvme_release_ls_cmd_kref() are consolidated into a single function such that the above code can be changed into a single kref_put() call.

Additionally, I think this patch introduces a behavior change. Today if a completion and abort request race, the NVMe command is completed. I think this patch changes that behavior into failing the NVMe command with status "aborted". That behavior change has not been described in the commit message. That makes me wonder whether that behavior change is unintentional?

Thanks,

Bart.





[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