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]
Date: Wed, 29 Nov 2023 09:21:26 +0530
From: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@...adcom.com>
To: Jiawen Wu <jiawenwu@...stnetic.com>
Cc: netdev@...r.kernel.org, edumazet@...gle.com, davem@...emloft.net, 
	kuba@...nel.org, pabeni@...hat.com, mengyuanlou@...-swift.com
Subject: Re: [PATCH net] net: libwx: fix memory leak on msix entry

On Tue, Nov 28, 2023 at 3:35 PM Jiawen Wu <jiawenwu@...stnetic.com> wrote:

> Since pci_free_irq_vectors() set pdev->msix_enabled as 0 in the
> calling of pci_msix_shutdown(), wx->msix_entries is never freed.
> Reordering the lines to fix the memory leak.
>
> Fixes: 3f703186113f ("net: libwx: Add irq flow functions")
> Signed-off-by: Jiawen Wu <jiawenwu@...stnetic.com>
> ---
>  drivers/net/ethernet/wangxun/libwx/wx_lib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Looks good to me.

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@...adcom.com>

>
> diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> index 2823861e5a92..a5a50b5a8816 100644
> --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> @@ -1972,11 +1972,11 @@ void wx_reset_interrupt_capability(struct wx *wx)
>         if (!pdev->msi_enabled && !pdev->msix_enabled)
>                 return;
>
> -       pci_free_irq_vectors(wx->pdev);
>         if (pdev->msix_enabled) {
>                 kfree(wx->msix_entries);
>                 wx->msix_entries = NULL;
>         }
> +       pci_free_irq_vectors(wx->pdev);
>  }
>  EXPORT_SYMBOL(wx_reset_interrupt_capability);
>
> --
> 2.27.0
>
>
>

-- 
Regards,
Kalesh A P

Content of type "text/html" skipped

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ