Re: [PATCH v1 1/1] scsi: ufs: Fix illegal address reading in upiu event trace

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

 



On 9/23/21 01:10, Jonathan Hsu wrote:
Fix incorrect index for UTMRD reference in ufshcd_add_tm_upiu_trace().

Signed-off-by: Jonathan Hsu <jonathan.hsu@xxxxxxxxxxxx>
Change-Id: I9acab6f3223f96d864948bb5670759d58cf92ad6
---
  drivers/scsi/ufs/ufshcd.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 3841ab49f556..36aa27cdc2ab 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -319,8 +319,7 @@ static void ufshcd_add_query_upiu_trace(struct ufs_hba *hba,
  static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag,
  				     enum ufs_trace_str_t str_t)
  {
-	int off = (int)tag - hba->nutrs;
-	struct utp_task_req_desc *descp = &hba->utmrdl_base_addr[off];
+	struct utp_task_req_desc *descp = &hba->utmrdl_base_addr[tag];
if (!trace_ufshcd_upiu_enabled())
  		return;

Please add a Fixes: tag. Is the above patch perhaps a fix for the following
commit: 4b42d557a8ad ("scsi: ufs: core: Fix wrong Task Tag used in task
management request UPIUs")?

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