Re: [PATCH v3 06/18] scsi: ufs: Remove ufshcd_valid_tag()

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

 



On 7/27/21 11:48 PM, Daejun Park wrote:
@@ -6979,24 +6966,15 @@ static int ufshcd_try_to_abort_task(struct ufs_hba *hba, int tag)
   */
  static int ufshcd_abort(struct scsi_cmnd *cmd)
  {
-        struct Scsi_Host *host;
-        struct ufs_hba *hba;
+        struct Scsi_Host *host = cmd->device->host;
+        struct ufs_hba *hba = shost_priv(host);
+        unsigned int tag = cmd->request->tag;
+        struct ufshcd_lrb *lrbp = &hba->lrb[tag];

If tag < 0, lrbp will be assigned incorrect pointer.

That shouldn't hurt since lrbp is only used after it has been verified that tag >= 0.

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