linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: Remove an unpaired ufshcd_scsi_unblock_requests() in err_handler()
@ 2020-08-18  5:20 Can Guo
  2020-08-18  5:42 ` Asutosh Das
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Can Guo @ 2020-08-18  5:20 UTC (permalink / raw)
  To: asutoshd, nguyenb, hongwus, rnayak, linux-scsi, kernel-team,
	saravanak, salyzyn, cang
  Cc: Alim Akhtar, Avri Altman, James E.J. Bottomley,
	Martin K. Petersen, Stanley Chu, Bean Huo, Bart Van Assche,
	open list

Commit 5586dd8ea250a ("scsi: ufs: Fix a race condition between error
handler and runtime PM ops") moves the ufshcd_scsi_block_requests() inside
err_handler(), but forgets to remove the ufshcd_scsi_unblock_requests() in
the early return path. Correct the coding mistake.

Signed-off-by: Can Guo <cang@codeaurora.org>

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 2b55c2e..b8441ad 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -5670,7 +5670,6 @@ static void ufshcd_err_handler(struct work_struct *work)
 		if (hba->ufshcd_state != UFSHCD_STATE_ERROR)
 			hba->ufshcd_state = UFSHCD_STATE_OPERATIONAL;
 		spin_unlock_irqrestore(hba->host->host_lock, flags);
-		ufshcd_scsi_unblock_requests(hba);
 		return;
 	}
 	ufshcd_set_eh_in_progress(hba);
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.


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

* Re: [PATCH] scsi: ufs: Remove an unpaired ufshcd_scsi_unblock_requests() in err_handler()
  2020-08-18  5:20 [PATCH] scsi: ufs: Remove an unpaired ufshcd_scsi_unblock_requests() in err_handler() Can Guo
@ 2020-08-18  5:42 ` Asutosh Das
  2020-08-18  9:29   ` hongwus
  2020-08-18 14:37 ` Bart Van Assche
  2020-08-20  6:24 ` Avri Altman
  2 siblings, 1 reply; 6+ messages in thread
From: Asutosh Das @ 2020-08-18  5:42 UTC (permalink / raw)
  To: Can Guo
  Cc: nguyenb, hongwus, rnayak, linux-scsi, kernel-team, saravanak,
	salyzyn, Alim Akhtar, Avri Altman, James E.J. Bottomley,
	Martin K. Petersen, Stanley Chu, Bean Huo, Bart Van Assche,
	open list

On Mon, Aug 17 2020 at 22:21 -0700, Can Guo wrote:
>Commit 5586dd8ea250a ("scsi: ufs: Fix a race condition between error
>handler and runtime PM ops") moves the ufshcd_scsi_block_requests() inside
>err_handler(), but forgets to remove the ufshcd_scsi_unblock_requests() in
>the early return path. Correct the coding mistake.
>
>Signed-off-by: Can Guo <cang@codeaurora.org>
>
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>

>diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
>index 2b55c2e..b8441ad 100644
>--- a/drivers/scsi/ufs/ufshcd.c
>+++ b/drivers/scsi/ufs/ufshcd.c
>@@ -5670,7 +5670,6 @@ static void ufshcd_err_handler(struct work_struct *work)
> 		if (hba->ufshcd_state != UFSHCD_STATE_ERROR)
> 			hba->ufshcd_state = UFSHCD_STATE_OPERATIONAL;
> 		spin_unlock_irqrestore(hba->host->host_lock, flags);
>-		ufshcd_scsi_unblock_requests(hba);
> 		return;
> 	}
> 	ufshcd_set_eh_in_progress(hba);
>-- 
>Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
>

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

* Re: [PATCH] scsi: ufs: Remove an unpaired ufshcd_scsi_unblock_requests() in err_handler()
  2020-08-18  5:42 ` Asutosh Das
@ 2020-08-18  9:29   ` hongwus
  0 siblings, 0 replies; 6+ messages in thread
From: hongwus @ 2020-08-18  9:29 UTC (permalink / raw)
  To: Asutosh Das
  Cc: Can Guo, nguyenb, rnayak, linux-scsi, kernel-team, saravanak,
	salyzyn, Alim Akhtar, Avri Altman, James E.J. Bottomley,
	Martin K. Petersen, Stanley Chu, Bean Huo, Bart Van Assche,
	open list, linux-scsi-owner

On 2020-08-18 13:42, Asutosh Das wrote:
> On Mon, Aug 17 2020 at 22:21 -0700, Can Guo wrote:
>> Commit 5586dd8ea250a ("scsi: ufs: Fix a race condition between error
>> handler and runtime PM ops") moves the ufshcd_scsi_block_requests() 
>> inside
>> err_handler(), but forgets to remove the 
>> ufshcd_scsi_unblock_requests() in
>> the early return path. Correct the coding mistake.
>> 
>> Signed-off-by: Can Guo <cang@codeaurora.org>
>> 
> Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
> 
>> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
>> index 2b55c2e..b8441ad 100644
>> --- a/drivers/scsi/ufs/ufshcd.c
>> +++ b/drivers/scsi/ufs/ufshcd.c
>> @@ -5670,7 +5670,6 @@ static void ufshcd_err_handler(struct 
>> work_struct *work)
>> 		if (hba->ufshcd_state != UFSHCD_STATE_ERROR)
>> 			hba->ufshcd_state = UFSHCD_STATE_OPERATIONAL;
>> 		spin_unlock_irqrestore(hba->host->host_lock, flags);
>> -		ufshcd_scsi_unblock_requests(hba);
>> 		return;
>> 	}
>> 	ufshcd_set_eh_in_progress(hba);
>> -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
>> a Linux Foundation Collaborative Project.
>> 

Reviewed-by: Hongwu Su<hongwus@codeaurora.org>

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

* Re: [PATCH] scsi: ufs: Remove an unpaired ufshcd_scsi_unblock_requests() in err_handler()
  2020-08-18  5:20 [PATCH] scsi: ufs: Remove an unpaired ufshcd_scsi_unblock_requests() in err_handler() Can Guo
  2020-08-18  5:42 ` Asutosh Das
@ 2020-08-18 14:37 ` Bart Van Assche
  2020-08-20  6:24 ` Avri Altman
  2 siblings, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2020-08-18 14:37 UTC (permalink / raw)
  To: Can Guo, asutoshd, nguyenb, hongwus, rnayak, linux-scsi,
	kernel-team, saravanak, salyzyn
  Cc: Alim Akhtar, Avri Altman, James E.J. Bottomley,
	Martin K. Petersen, Stanley Chu, Bean Huo, open list

On 2020-08-17 22:20, Can Guo wrote:
> Commit 5586dd8ea250a ("scsi: ufs: Fix a race condition between error
> handler and runtime PM ops") moves the ufshcd_scsi_block_requests() inside
> err_handler(), but forgets to remove the ufshcd_scsi_unblock_requests() in
> the early return path. Correct the coding mistake.
> 
> Signed-off-by: Can Guo <cang@codeaurora.org>

Hi Can,

Please add a "Fixes:" tag.

Thanks,

Bart.

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

* RE: [PATCH] scsi: ufs: Remove an unpaired ufshcd_scsi_unblock_requests() in err_handler()
  2020-08-18  5:20 [PATCH] scsi: ufs: Remove an unpaired ufshcd_scsi_unblock_requests() in err_handler() Can Guo
  2020-08-18  5:42 ` Asutosh Das
  2020-08-18 14:37 ` Bart Van Assche
@ 2020-08-20  6:24 ` Avri Altman
  2020-08-20  6:35   ` Can Guo
  2 siblings, 1 reply; 6+ messages in thread
From: Avri Altman @ 2020-08-20  6:24 UTC (permalink / raw)
  To: Can Guo, asutoshd, nguyenb, hongwus, rnayak, linux-scsi,
	kernel-team, saravanak, salyzyn
  Cc: Alim Akhtar, James E.J. Bottomley, Martin K. Petersen,
	Stanley Chu, Bean Huo, Bart Van Assche, open list

 
> 
> Commit 5586dd8ea250a ("scsi: ufs: Fix a race condition between error
> handler and runtime PM ops") moves the ufshcd_scsi_block_requests() inside
> err_handler(), but forgets to remove the ufshcd_scsi_unblock_requests() in
> the early return path. Correct the coding mistake.

"fixes" tag please, for those who don't read the commit message.
Thanks,
Avri
> 
> Signed-off-by: Can Guo <cang@codeaurora.org>
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 2b55c2e..b8441ad 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -5670,7 +5670,6 @@ static void ufshcd_err_handler(struct work_struct
> *work)
>                 if (hba->ufshcd_state != UFSHCD_STATE_ERROR)
>                         hba->ufshcd_state = UFSHCD_STATE_OPERATIONAL;
>                 spin_unlock_irqrestore(hba->host->host_lock, flags);
> -               ufshcd_scsi_unblock_requests(hba);
>                 return;
>         }
>         ufshcd_set_eh_in_progress(hba);
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux
> Foundation Collaborative Project.


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

* Re: [PATCH] scsi: ufs: Remove an unpaired ufshcd_scsi_unblock_requests() in err_handler()
  2020-08-20  6:24 ` Avri Altman
@ 2020-08-20  6:35   ` Can Guo
  0 siblings, 0 replies; 6+ messages in thread
From: Can Guo @ 2020-08-20  6:35 UTC (permalink / raw)
  To: Avri Altman
  Cc: asutoshd, nguyenb, hongwus, rnayak, linux-scsi, kernel-team,
	saravanak, salyzyn, Alim Akhtar, James E.J. Bottomley,
	Martin K. Petersen, Stanley Chu, Bean Huo, Bart Van Assche,
	open list

On 2020-08-20 14:24, Avri Altman wrote:
>> 
>> Commit 5586dd8ea250a ("scsi: ufs: Fix a race condition between error
>> handler and runtime PM ops") moves the ufshcd_scsi_block_requests() 
>> inside
>> err_handler(), but forgets to remove the 
>> ufshcd_scsi_unblock_requests() in
>> the early return path. Correct the coding mistake.
> 
> "fixes" tag please, for those who don't read the commit message.
> Thanks,
> Avri

Already added one in the V2 of it.

Thanks,

Can Guo.

>> 
>> Signed-off-by: Can Guo <cang@codeaurora.org>
>> 
>> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
>> index 2b55c2e..b8441ad 100644
>> --- a/drivers/scsi/ufs/ufshcd.c
>> +++ b/drivers/scsi/ufs/ufshcd.c
>> @@ -5670,7 +5670,6 @@ static void ufshcd_err_handler(struct 
>> work_struct
>> *work)
>>                 if (hba->ufshcd_state != UFSHCD_STATE_ERROR)
>>                         hba->ufshcd_state = UFSHCD_STATE_OPERATIONAL;
>>                 spin_unlock_irqrestore(hba->host->host_lock, flags);
>> -               ufshcd_scsi_unblock_requests(hba);
>>                 return;
>>         }
>>         ufshcd_set_eh_in_progress(hba);
>> --
>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a 
>> Linux
>> Foundation Collaborative Project.

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

end of thread, other threads:[~2020-08-20  6:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-18  5:20 [PATCH] scsi: ufs: Remove an unpaired ufshcd_scsi_unblock_requests() in err_handler() Can Guo
2020-08-18  5:42 ` Asutosh Das
2020-08-18  9:29   ` hongwus
2020-08-18 14:37 ` Bart Van Assche
2020-08-20  6:24 ` Avri Altman
2020-08-20  6:35   ` Can Guo

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).