All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] scsi: ufs: Fix illegal address reading in upiu event trace
@ 2021-09-24  7:33 Jonathan Hsu
  2021-09-24  7:53 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Hsu @ 2021-09-24  7:33 UTC (permalink / raw)
  To: stanley.chu, linux-scsi, martin.petersen, avri.altman, alim.akhtar, jejb
  Cc: stable, peter.wang, chun-hung.wu, alice.chao, jonathan.hsu,
	powen.kao, cc.chou, chaotian.jing, jiajie.hao, wsd_upstream

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")
Signed-off-by: Jonathan Hsu <jonathan.hsu@mediatek.com>
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;
-- 
2.18.0


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

* Re: [PATCH v1 1/1] scsi: ufs: Fix illegal address reading in upiu event trace
  2021-09-24  7:33 [PATCH v1 1/1] scsi: ufs: Fix illegal address reading in upiu event trace Jonathan Hsu
@ 2021-09-24  7:53 ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-09-24  7:53 UTC (permalink / raw)
  To: Jonathan Hsu
  Cc: stanley.chu, linux-scsi, martin.petersen, avri.altman,
	alim.akhtar, jejb, stable, peter.wang, chun-hung.wu, alice.chao,
	powen.kao, cc.chou, chaotian.jing, jiajie.hao, wsd_upstream

On Fri, Sep 24, 2021 at 03:33:09PM +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")
> Signed-off-by: Jonathan Hsu <jonathan.hsu@mediatek.com>
> Change-Id: I9acab6f3223f96d864948bb5670759d58cf92ad6
> ---
>  drivers/scsi/ufs/ufshcd.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

Also, always run checkpatch.pl on your patches, it will show you that
the "Change-Id" field is not valid here.

thanks,

greg k-h

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

* Re: [PATCH v1 1/1] scsi: ufs: Fix illegal address reading in upiu event trace
  2021-09-23  8:10 Jonathan Hsu
@ 2021-09-24  2:51 ` Bart Van Assche
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2021-09-24  2:51 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

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@mediatek.com>
> 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.

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

* [PATCH v1 1/1] scsi: ufs: Fix illegal address reading in upiu event trace
@ 2021-09-23  8:10 Jonathan Hsu
  2021-09-24  2:51 ` Bart Van Assche
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Hsu @ 2021-09-23  8:10 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

Fix incorrect index for UTMRD reference in ufshcd_add_tm_upiu_trace().

Signed-off-by: Jonathan Hsu <jonathan.hsu@mediatek.com>
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;
-- 
2.18.0


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

end of thread, other threads:[~2021-09-24  7:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24  7:33 [PATCH v1 1/1] scsi: ufs: Fix illegal address reading in upiu event trace Jonathan Hsu
2021-09-24  7:53 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2021-09-23  8:10 Jonathan Hsu
2021-09-24  2:51 ` Bart Van Assche

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.