mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 04:56:13 +02:00
net: libwx: fix memory leak on msix entry
commit91fdb30ddfupstream. 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. Cc: stable@vger.kernel.org Fixes:3f70318611("net: libwx: Add irq flow functions") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Link: https://lore.kernel.org/r/20231128095928.1083292-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2d5eb4e5af
commit
5368a515a3
|
|
@ -1965,11 +1965,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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user