* [PATCH] scsi: ufshcd: fix missing destroy_workqueue() on error in ufshcd_init
@ 2020-11-09 9:15 Qinglang Miao
2020-11-09 9:40 ` Avri Altman
0 siblings, 1 reply; 3+ messages in thread
From: Qinglang Miao @ 2020-11-09 9:15 UTC (permalink / raw)
To: Alim Akhtar, Avri Altman, James E.J. Bottomley, Martin K. Petersen
Cc: linux-scsi, linux-kernel, Qinglang Miao
Add the missing destroy_workqueue() before return from
ufshcd_init in the error handling case. It seems that
exit_gating is an appropriate place.
Fixes: 4db7a2360597 ("scsi: ufs: Fix concurrency of error handler and other error recovery paths")
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
drivers/scsi/ufs/ufshcd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index b8f573a02713..9eaa0eaca374 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -9206,6 +9206,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
exit_gating:
ufshcd_exit_clk_scaling(hba);
ufshcd_exit_clk_gating(hba);
+ destroy_workqueue(hba->eh_wq);
out_disable:
hba->is_irq_enabled = false;
ufshcd_hba_exit(hba);
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] scsi: ufshcd: fix missing destroy_workqueue() on error in ufshcd_init
2020-11-09 9:15 [PATCH] scsi: ufshcd: fix missing destroy_workqueue() on error in ufshcd_init Qinglang Miao
@ 2020-11-09 9:40 ` Avri Altman
2020-11-10 1:19 ` Qinglang Miao
0 siblings, 1 reply; 3+ messages in thread
From: Avri Altman @ 2020-11-09 9:40 UTC (permalink / raw)
To: Qinglang Miao, Alim Akhtar, James E.J. Bottomley, Martin K. Petersen
Cc: linux-scsi, linux-kernel
>
> Add the missing destroy_workqueue() before return from
> ufshcd_init in the error handling case. It seems that
> exit_gating is an appropriate place.
>
> Fixes: 4db7a2360597 ("scsi: ufs: Fix concurrency of error handler and other
> error recovery paths")
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
> drivers/scsi/ufs/ufshcd.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index b8f573a02713..9eaa0eaca374 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -9206,6 +9206,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem
> *mmio_base, unsigned int irq)
> exit_gating:
> ufshcd_exit_clk_scaling(hba);
> ufshcd_exit_clk_gating(hba);
> + destroy_workqueue(hba->eh_wq);
Maybe also in ufshcd_remove?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufshcd: fix missing destroy_workqueue() on error in ufshcd_init
2020-11-09 9:40 ` Avri Altman
@ 2020-11-10 1:19 ` Qinglang Miao
0 siblings, 0 replies; 3+ messages in thread
From: Qinglang Miao @ 2020-11-10 1:19 UTC (permalink / raw)
To: Avri Altman, Alim Akhtar, James E.J. Bottomley, Martin K. Petersen
Cc: linux-scsi, linux-kernel
在 2020/11/9 17:40, Avri Altman 写道:
>>
>> Add the missing destroy_workqueue() before return from
>> ufshcd_init in the error handling case. It seems that
>> exit_gating is an appropriate place.
>>
>> Fixes: 4db7a2360597 ("scsi: ufs: Fix concurrency of error handler and other
>> error recovery paths")
>> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
>> ---
>> drivers/scsi/ufs/ufshcd.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
>> index b8f573a02713..9eaa0eaca374 100644
>> --- a/drivers/scsi/ufs/ufshcd.c
>> +++ b/drivers/scsi/ufs/ufshcd.c
>> @@ -9206,6 +9206,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem
>> *mmio_base, unsigned int irq)
>> exit_gating:
>> ufshcd_exit_clk_scaling(hba);
>> ufshcd_exit_clk_gating(hba);
>> + destroy_workqueue(hba->eh_wq);
> Maybe also in ufshcd_remove?
> .
You're right Avri, thanks!
I'm gonna send a v2 on this patch to cover ufshcd_remove.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-10 1:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 9:15 [PATCH] scsi: ufshcd: fix missing destroy_workqueue() on error in ufshcd_init Qinglang Miao
2020-11-09 9:40 ` Avri Altman
2020-11-10 1:19 ` Qinglang Miao
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).