]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbevf: Fix resource leak in ixgbevf_init_module()
authorShang XiaoJing <shangxiaojing@huawei.com>
Mon, 14 Nov 2022 02:57:58 +0000 (10:57 +0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 23 Nov 2022 16:36:54 +0000 (08:36 -0800)
commitb949cdc90bb713a014db93406b6d7cee18466b4d
tree817c46a3551e9782e9223f6bbe71e160a6fc20f3
parentfc6f40271c7291551d199b23b46562968b714706
ixgbevf: Fix resource leak in ixgbevf_init_module()

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 5812163a8f3c
("usb: u132-hcd: fix resource leak")

Fixes: c546b1a0b8d5 ("ixgbevf: Use a private workqueue to avoid certain possible hangs")
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Reviewed-by: Saeed Mahameed <saeed@kernel.org>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c