Commit 65b9da38 authored by Shang XiaoJing's avatar Shang XiaoJing Committed by sanglipeng
Browse files

ixgbevf: Fix resource leak in ixgbevf_init_module()

stable inclusion
from stable-v5.10.158
commit f166c62cad798c53300b4b327e44300c73ec492d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7NTXH

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



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

[ Upstream commit 8cfa238a ]

ixgbevf_init_module() won't destroy the workqueue created by
create_singlethread_workqueue() when pci_register_driver() failed. Add
destroy_workqueue() in fail path to prevent the resource leak.

Similar to the handling of u132_hcd_init in commit f276e002
("usb: u132-hcd: fix resource leak")

Fixes: 40a13e24 ("ixgbevf: Use a private workqueue to avoid certain possible hangs")
Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
Reviewed-by: default avatarSaeed Mahameed <saeed@kernel.org>
Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 3b1b6cf4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment