* [PATCH] net: thunderx: Fix missing destroy_workqueue of nicvf_rx_mode_wq
@ 2022-12-03 9:41 Yongqiang Liu
2022-12-03 15:14 ` Pavan Chebbi
2022-12-06 11:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Yongqiang Liu @ 2022-12-03 9:41 UTC (permalink / raw)
To: netdev, linux-kernel, linux-arm-kernel
Cc: davem, edumazet, kuba, pabeni, vlomovtsev, zhangxiaoxu5,
liuyongqiang13, weiyongjun1, sgoutham
The nicvf_probe() won't destroy workqueue when register_netdev()
failed. Add destroy_workqueue err handle case to fix this issue.
Fixes: 2ecbe4f4a027 ("net: thunderx: replace global nicvf_rx_mode_wq work queue for all VFs to private for each of them.")
Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
---
drivers/net/ethernet/cavium/thunder/nicvf_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
index 98f3dc460ca7..f2f95493ec89 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
@@ -2239,7 +2239,7 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err = register_netdev(netdev);
if (err) {
dev_err(dev, "Failed to register netdevice\n");
- goto err_unregister_interrupts;
+ goto err_destroy_workqueue;
}
nic->msg_enable = debug;
@@ -2248,6 +2248,8 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return 0;
+err_destroy_workqueue:
+ destroy_workqueue(nic->nicvf_rx_mode_wq);
err_unregister_interrupts:
nicvf_unregister_interrupts(nic);
err_free_netdev:
--
2.27.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: thunderx: Fix missing destroy_workqueue of nicvf_rx_mode_wq
2022-12-03 9:41 [PATCH] net: thunderx: Fix missing destroy_workqueue of nicvf_rx_mode_wq Yongqiang Liu
@ 2022-12-03 15:14 ` Pavan Chebbi
2022-12-06 11:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Pavan Chebbi @ 2022-12-03 15:14 UTC (permalink / raw)
To: Yongqiang Liu
Cc: netdev, linux-kernel, linux-arm-kernel, davem, edumazet, kuba,
pabeni, vlomovtsev, zhangxiaoxu5, weiyongjun1, sgoutham
[-- Attachment #1.1: Type: text/plain, Size: 1553 bytes --]
On Sat, Dec 3, 2022 at 3:11 PM Yongqiang Liu <liuyongqiang13@huawei.com> wrote:
>
> The nicvf_probe() won't destroy workqueue when register_netdev()
> failed. Add destroy_workqueue err handle case to fix this issue.
>
> Fixes: 2ecbe4f4a027 ("net: thunderx: replace global nicvf_rx_mode_wq work queue for all VFs to private for each of them.")
> Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
> ---
> drivers/net/ethernet/cavium/thunder/nicvf_main.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
> index 98f3dc460ca7..f2f95493ec89 100644
> --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c
> +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
> @@ -2239,7 +2239,7 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> err = register_netdev(netdev);
> if (err) {
> dev_err(dev, "Failed to register netdevice\n");
> - goto err_unregister_interrupts;
> + goto err_destroy_workqueue;
> }
>
> nic->msg_enable = debug;
> @@ -2248,6 +2248,8 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> return 0;
>
> +err_destroy_workqueue:
> + destroy_workqueue(nic->nicvf_rx_mode_wq);
> err_unregister_interrupts:
> nicvf_unregister_interrupts(nic);
> err_free_netdev:
> --
> 2.27.0
>
Looks good to me.
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: thunderx: Fix missing destroy_workqueue of nicvf_rx_mode_wq
2022-12-03 9:41 [PATCH] net: thunderx: Fix missing destroy_workqueue of nicvf_rx_mode_wq Yongqiang Liu
2022-12-03 15:14 ` Pavan Chebbi
@ 2022-12-06 11:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-06 11:50 UTC (permalink / raw)
To: Yongqiang Liu
Cc: netdev, linux-kernel, linux-arm-kernel, davem, edumazet, kuba,
pabeni, vlomovtsev, zhangxiaoxu5, weiyongjun1, sgoutham
Hello:
This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:
On Sat, 3 Dec 2022 09:41:25 +0000 you wrote:
> The nicvf_probe() won't destroy workqueue when register_netdev()
> failed. Add destroy_workqueue err handle case to fix this issue.
>
> Fixes: 2ecbe4f4a027 ("net: thunderx: replace global nicvf_rx_mode_wq work queue for all VFs to private for each of them.")
> Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
> ---
> drivers/net/ethernet/cavium/thunder/nicvf_main.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Here is the summary with links:
- net: thunderx: Fix missing destroy_workqueue of nicvf_rx_mode_wq
https://git.kernel.org/netdev/net/c/42330a32933f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-06 11:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-03 9:41 [PATCH] net: thunderx: Fix missing destroy_workqueue of nicvf_rx_mode_wq Yongqiang Liu
2022-12-03 15:14 ` Pavan Chebbi
2022-12-06 11:50 ` patchwork-bot+netdevbpf
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).