Commit 8438ed8a authored by Jiawen Wu's avatar Jiawen Wu Committed by Zheng Zengkai
Browse files

net: libwx: fix memory leak on msix entry

stable inclusion
from stable-v6.6.5
commit 5368a515a37fdbc65f85d3c08374e667a40a7981
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8N21P

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5368a515a37fdbc65f85d3c08374e667a40a7981



--------------------------------

commit 91fdb30ddfdb651509914d3ed0a0302712540fed upstream.

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: 3f703186 ("net: libwx: Add irq flow functions")
Signed-off-by: default avatarJiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: default avatarKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Link: https://lore.kernel.org/r/20231128095928.1083292-1-jiawenwu@trustnetic.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent a1c17772
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment