lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALs4sv2DR2yoUi07aTsMVHiTCNPSBZXWsZOTKsBfLRfgUbOH=g@mail.gmail.com>
Date:   Sat, 3 Dec 2022 20:44:51 +0530
From:   Pavan Chebbi <pavan.chebbi@...adcom.com>
To:     Yongqiang Liu <liuyongqiang13@...wei.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, davem@...emloft.net,
        edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
        vlomovtsev@...vell.com, zhangxiaoxu5@...wei.com,
        weiyongjun1@...wei.com, sgoutham@...vell.com
Subject: Re: [PATCH] net: thunderx: Fix missing destroy_workqueue of nicvf_rx_mode_wq

On Sat, Dec 3, 2022 at 3:11 PM Yongqiang Liu <liuyongqiang13@...wei.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@...wei.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@...adcom.com>

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ