* [PATCH v2] scsi: ufshcd: fix missing destroy_workqueue()
@ 2020-11-10 7:42 Qinglang Miao
2020-11-10 7:52 ` Avri Altman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Qinglang Miao @ 2020-11-10 7:42 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 as well as in
ufshcd_remove.
Fixes: 4db7a2360597 ("scsi: ufs: Fix concurrency of error handler and other error recovery paths")
Suggested-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
v2: consider missing destroy_workqueue ufshcd_remove either.
drivers/scsi/ufs/ufshcd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index b8f573a02713..adbdda4f556b 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -8906,6 +8906,7 @@ void ufshcd_remove(struct ufs_hba *hba)
blk_mq_free_tag_set(&hba->tmf_tag_set);
blk_cleanup_queue(hba->cmd_queue);
scsi_remove_host(hba->host);
+ destroy_workqueue(hba->eh_wq);
/* disable interrupts */
ufshcd_disable_intr(hba, hba->intr_mask);
ufshcd_hba_stop(hba);
@@ -9206,6 +9207,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] 4+ messages in thread
* RE: [PATCH v2] scsi: ufshcd: fix missing destroy_workqueue()
2020-11-10 7:42 [PATCH v2] scsi: ufshcd: fix missing destroy_workqueue() Qinglang Miao
@ 2020-11-10 7:52 ` Avri Altman
2020-11-10 18:17 ` Asutosh Das (asd)
2020-11-17 6:05 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Avri Altman @ 2020-11-10 7:52 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 as well as in
> ufshcd_remove.
>
> Fixes: 4db7a2360597 ("scsi: ufs: Fix concurrency of error handler and other
> error recovery paths")
> Suggested-by: Avri Altman <Avri.Altman@wdc.com>
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
> ---
> v2: consider missing destroy_workqueue ufshcd_remove either.
>
> drivers/scsi/ufs/ufshcd.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index b8f573a02713..adbdda4f556b 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -8906,6 +8906,7 @@ void ufshcd_remove(struct ufs_hba *hba)
> blk_mq_free_tag_set(&hba->tmf_tag_set);
> blk_cleanup_queue(hba->cmd_queue);
> scsi_remove_host(hba->host);
> + destroy_workqueue(hba->eh_wq);
> /* disable interrupts */
> ufshcd_disable_intr(hba, hba->intr_mask);
> ufshcd_hba_stop(hba);
> @@ -9206,6 +9207,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 [flat|nested] 4+ messages in thread
* Re: [PATCH v2] scsi: ufshcd: fix missing destroy_workqueue()
2020-11-10 7:42 [PATCH v2] scsi: ufshcd: fix missing destroy_workqueue() Qinglang Miao
2020-11-10 7:52 ` Avri Altman
@ 2020-11-10 18:17 ` Asutosh Das (asd)
2020-11-17 6:05 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Asutosh Das (asd) @ 2020-11-10 18:17 UTC (permalink / raw)
To: Qinglang Miao, Alim Akhtar, Avri Altman, James E.J. Bottomley,
Martin K. Petersen
Cc: linux-scsi, linux-kernel
On 11/9/2020 11:42 PM, Qinglang Miao wrote:
> Add the missing destroy_workqueue() before return from
> ufshcd_init in the error handling case as well as in
> ufshcd_remove.
>
> Fixes: 4db7a2360597 ("scsi: ufs: Fix concurrency of error handler and other error recovery paths")
> Suggested-by: Avri Altman <Avri.Altman@wdc.com>
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
> v2: consider missing destroy_workqueue ufshcd_remove either.
>
> drivers/scsi/ufs/ufshcd.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index b8f573a02713..adbdda4f556b 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -8906,6 +8906,7 @@ void ufshcd_remove(struct ufs_hba *hba)
> blk_mq_free_tag_set(&hba->tmf_tag_set);
> blk_cleanup_queue(hba->cmd_queue);
> scsi_remove_host(hba->host);
> + destroy_workqueue(hba->eh_wq);
> /* disable interrupts */
> ufshcd_disable_intr(hba, hba->intr_mask);
> ufshcd_hba_stop(hba);
> @@ -9206,6 +9207,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);
>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] scsi: ufshcd: fix missing destroy_workqueue()
2020-11-10 7:42 [PATCH v2] scsi: ufshcd: fix missing destroy_workqueue() Qinglang Miao
2020-11-10 7:52 ` Avri Altman
2020-11-10 18:17 ` Asutosh Das (asd)
@ 2020-11-17 6:05 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2020-11-17 6:05 UTC (permalink / raw)
To: Alim Akhtar, James E.J. Bottomley, Qinglang Miao, Avri Altman
Cc: Martin K . Petersen, linux-scsi, linux-kernel
On Tue, 10 Nov 2020 15:42:23 +0800, Qinglang Miao wrote:
> Add the missing destroy_workqueue() before return from
> ufshcd_init in the error handling case as well as in
> ufshcd_remove.
Applied to 5.10/scsi-fixes, thanks!
[1/1] scsi: ufshcd: Fix missing destroy_workqueue()
https://git.kernel.org/mkp/scsi/c/2e6f11a797a2
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-17 6:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 7:42 [PATCH v2] scsi: ufshcd: fix missing destroy_workqueue() Qinglang Miao
2020-11-10 7:52 ` Avri Altman
2020-11-10 18:17 ` Asutosh Das (asd)
2020-11-17 6:05 ` 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).