stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 1/1] scsi: ufs: Fix illegal address reading in upiu event trace
@ 2021-09-24  8:58 Jonathan Hsu
  2021-09-24 10:21 ` Stanley Chu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jonathan Hsu @ 2021-09-24  8:58 UTC (permalink / raw)
  To: stanley.chu, linux-scsi, martin.petersen, avri.altman, alim.akhtar, jejb
  Cc: peter.wang, chun-hung.wu, alice.chao, jonathan.hsu, powen.kao,
	cc.chou, chaotian.jing, jiajie.hao, wsd_upstream, stable

Fix incorrect index for UTMRD reference in ufshcd_add_tm_upiu_trace().

Fixes: 4b42d557a8ad ("scsi: ufs: core: Fix wrong Task Tag used in task management request UPIUs")
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Hsu <jonathan.hsu@mediatek.com>
---
 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;
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 1/1] scsi: ufs: Fix illegal address reading in upiu event trace
  2021-09-24  8:58 [PATCH v4 1/1] scsi: ufs: Fix illegal address reading in upiu event trace Jonathan Hsu
@ 2021-09-24 10:21 ` Stanley Chu
  2021-09-24 16:54 ` Bart Van Assche
  2021-09-29  4:19 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Stanley Chu @ 2021-09-24 10:21 UTC (permalink / raw)
  To: Jonathan Hsu, linux-scsi, martin.petersen, avri.altman,
	alim.akhtar, jejb
  Cc: peter.wang, chun-hung.wu, alice.chao, powen.kao, cc.chou,
	chaotian.jing, jiajie.hao, wsd_upstream, stable

On Fri, 2021-09-24 at 16:58 +0800, Jonathan Hsu wrote:
> Fix incorrect index for UTMRD reference in
> ufshcd_add_tm_upiu_trace().
> 
> Fixes: 4b42d557a8ad ("scsi: ufs: core: Fix wrong Task Tag used in
> task management request UPIUs")
> Cc: stable@vger.kernel.org
> Signed-off-by: Jonathan Hsu <jonathan.hsu@mediatek.com>
> 

Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 1/1] scsi: ufs: Fix illegal address reading in upiu event trace
  2021-09-24  8:58 [PATCH v4 1/1] scsi: ufs: Fix illegal address reading in upiu event trace Jonathan Hsu
  2021-09-24 10:21 ` Stanley Chu
@ 2021-09-24 16:54 ` Bart Van Assche
  2021-09-29  4:19 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2021-09-24 16:54 UTC (permalink / raw)
  To: Jonathan Hsu, stanley.chu, linux-scsi, martin.petersen,
	avri.altman, alim.akhtar, jejb
  Cc: peter.wang, chun-hung.wu, alice.chao, powen.kao, cc.chou,
	chaotian.jing, jiajie.hao, wsd_upstream, stable

On 9/24/21 1:58 AM, Jonathan Hsu wrote:
> Fix incorrect index for UTMRD reference in ufshcd_add_tm_upiu_trace().
> 
> Fixes: 4b42d557a8ad ("scsi: ufs: core: Fix wrong Task Tag used in task management request UPIUs")
> Cc: stable@vger.kernel.org
> Signed-off-by: Jonathan Hsu <jonathan.hsu@mediatek.com>

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 1/1] scsi: ufs: Fix illegal address reading in upiu event trace
  2021-09-24  8:58 [PATCH v4 1/1] scsi: ufs: Fix illegal address reading in upiu event trace Jonathan Hsu
  2021-09-24 10:21 ` Stanley Chu
  2021-09-24 16:54 ` Bart Van Assche
@ 2021-09-29  4:19 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-09-29  4:19 UTC (permalink / raw)
  To: alim.akhtar, avri.altman, Jonathan Hsu, jejb, stanley.chu, linux-scsi
  Cc: Martin K . Petersen, powen.kao, jiajie.hao, peter.wang,
	alice.chao, cc.chou, chun-hung.wu, stable, wsd_upstream,
	chaotian.jing

On Fri, 24 Sep 2021 16:58:48 +0800, Jonathan Hsu wrote:

> Fix incorrect index for UTMRD reference in ufshcd_add_tm_upiu_trace().
> 
> 

Applied to 5.15/scsi-fixes, thanks!

[1/1] scsi: ufs: Fix illegal address reading in upiu event trace
      https://git.kernel.org/mkp/scsi/c/e8c2da7e329c

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-29  4:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24  8:58 [PATCH v4 1/1] scsi: ufs: Fix illegal address reading in upiu event trace Jonathan Hsu
2021-09-24 10:21 ` Stanley Chu
2021-09-24 16:54 ` Bart Van Assche
2021-09-29  4:19 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).