mirror of
https://github.com/torvalds/linux.git
synced 2025-11-10 05:30:50 +02:00
A problem about modprobe fm10k failed is triggered with the following log
given:
Intel(R) Ethernet Switch Host Interface Driver
Copyright(c) 2013 - 2019 Intel Corporation.
debugfs: Directory 'fm10k' with parent '/' already present!
The reason is that fm10k_init_module() returns fm10k_register_pci_driver()
directly without checking its return value, if fm10k_register_pci_driver()
failed, it returns without removing debugfs and destroy workqueue,
resulting the debugfs of fm10k can never be created later and leaks the
workqueue.
fm10k_init_module()
alloc_workqueue()
fm10k_dbg_init() # create debugfs
fm10k_register_pci_driver()
pci_register_driver()
driver_register()
bus_add_driver()
priv = kzalloc(...) # OOM happened
# return without remove debugfs and destroy workqueue
Fix by remove debugfs and destroy workqueue when
fm10k_register_pci_driver() returns error.
Fixes:
|
||
|---|---|---|
| .. | ||
| fm10k.h | ||
| fm10k_common.c | ||
| fm10k_common.h | ||
| fm10k_dcbnl.c | ||
| fm10k_debugfs.c | ||
| fm10k_ethtool.c | ||
| fm10k_iov.c | ||
| fm10k_main.c | ||
| fm10k_mbx.c | ||
| fm10k_mbx.h | ||
| fm10k_netdev.c | ||
| fm10k_pci.c | ||
| fm10k_pf.c | ||
| fm10k_pf.h | ||
| fm10k_tlv.c | ||
| fm10k_tlv.h | ||
| fm10k_type.h | ||
| fm10k_vf.c | ||
| fm10k_vf.h | ||
| Makefile | ||