netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.10 001/116] Bluetooth: Fix debugfs entry leak in hci_register_dev()
@ 2022-01-18  2:38 Sasha Levin
  2022-01-18  2:38 ` [PATCH AUTOSEL 5.10 003/116] libbpf: Validate that .BTF and .BTF.ext sections contain data Sasha Levin
                   ` (35 more replies)
  0 siblings, 36 replies; 38+ messages in thread
From: Sasha Levin @ 2022-01-18  2:38 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Wei Yongjun, Marcel Holtmann, Sasha Levin, johan.hedberg,
	luiz.dentz, davem, kuba, linux-bluetooth, netdev

From: Wei Yongjun <weiyongjun1@huawei.com>

[ Upstream commit 5a4bb6a8e981d3d0d492aa38412ee80b21033177 ]

Fault injection test report debugfs entry leak as follows:

debugfs: Directory 'hci0' with parent 'bluetooth' already present!

When register_pm_notifier() failed in hci_register_dev(), the debugfs
create by debugfs_create_dir() do not removed in the error handing path.

Add the remove debugfs code to fix it.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/bluetooth/hci_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 2ad66f64879f1..2e7998bad133b 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3810,6 +3810,7 @@ int hci_register_dev(struct hci_dev *hdev)
 	return id;
 
 err_wqueue:
+	debugfs_remove_recursive(hdev->debugfs);
 	destroy_workqueue(hdev->workqueue);
 	destroy_workqueue(hdev->req_workqueue);
 err:
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2022-01-22 19:25 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-18  2:38 [PATCH AUTOSEL 5.10 001/116] Bluetooth: Fix debugfs entry leak in hci_register_dev() Sasha Levin
2022-01-18  2:38 ` [PATCH AUTOSEL 5.10 003/116] libbpf: Validate that .BTF and .BTF.ext sections contain data Sasha Levin
2022-01-18  2:38 ` [PATCH AUTOSEL 5.10 005/116] selftests/bpf: Fix bpf_object leak in skb_ctx selftest Sasha Levin
2022-01-18  2:38 ` [PATCH AUTOSEL 5.10 006/116] ar5523: Fix null-ptr-deref with unexpected WDCMSG_TARGET_START reply Sasha Levin
2022-01-18  2:38 ` [PATCH AUTOSEL 5.10 013/116] batman-adv: allow netlink usage in unprivileged containers Sasha Levin
2022-01-18  2:38 ` [PATCH AUTOSEL 5.10 015/116] ath11k: Fix crash caused by uninitialized TX ring Sasha Levin
2022-01-18  2:38 ` [PATCH AUTOSEL 5.10 025/116] mlxsw: pci: Add shutdown method in PCI driver Sasha Levin
2022-01-18  2:38 ` [PATCH AUTOSEL 5.10 031/116] mwifiex: Fix skb_over_panic in mwifiex_usb_recv() Sasha Levin
2022-01-18  2:38 ` [PATCH AUTOSEL 5.10 032/116] rsi: Fix use-after-free in rsi_rx_done_handler() Sasha Levin
2022-01-18  2:38 ` [PATCH AUTOSEL 5.10 033/116] rsi: Fix out-of-bounds read in rsi_read_pkt() Sasha Levin
2022-01-18  2:38 ` [PATCH AUTOSEL 5.10 034/116] ath11k: Avoid NULL ptr access during mgmt tx cleanup Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 050/116] iwlwifi: mvm: synchronize with FW after multicast commands Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 051/116] iwlwifi: mvm: avoid clearing a just saved session protection id Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 052/116] net: dsa: ocelot: felix: Remove requirement for PCS in felix devices Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 053/116] ath11k: avoid deadlock by change ieee80211_queue_work for regd_update_work Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 054/116] ath10k: Fix tx hanging Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 055/116] net-sysfs: update the queue counts in the unregistration path Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 056/116] net: phy: prefer 1000baseT over 1000baseKX Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 059/116] net: Enable neighbor sysctls that is save for userns root Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 060/116] ath11k: Avoid false DEADLOCK warning reported by lockdep Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 065/116] net: bonding: debug: avoid printing debug logs when bond is not notifying peers Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 066/116] bpf: Do not WARN in bpf_warn_invalid_xdp_action() Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 077/116] ath9k: Fix out-of-bound memcpy in ath9k_hif_usb_rx_stream Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 078/116] rtw88: 8822c: update rx settings to prevent potential hw deadlock Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 080/116] iwlwifi: fix leaks/bad data after failed firmware load Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 081/116] iwlwifi: remove module loading failure message Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 082/116] iwlwifi: mvm: Fix calculation of frame length Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 083/116] iwlwifi: pcie: make sure prph_info is set when treating wakeup IRQ Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 085/116] ath11k: Fix napi related hang Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 087/116] xfrm: rate limit SA mapping change message to user space Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 101/116] net: mdio: Demote probed message to debug print Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 102/116] mac80211: allow non-standard VHT MCS-10/11 Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 105/116] mlxsw: pci: Avoid flow control for EMAD packets Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 106/116] net: phy: marvell: configure RGMII delays for 88E1118 Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 107/116] net: gemini: allow any RGMII interface mode Sasha Levin
2022-01-18  2:39 ` [PATCH AUTOSEL 5.10 108/116] net: dsa: hold rtnl_mutex when calling dsa_master_{setup,teardown} Sasha Levin
2022-01-18 17:13 ` [PATCH AUTOSEL 5.10 001/116] Bluetooth: Fix debugfs entry leak in hci_register_dev() Pavel Machek
2022-01-22 19:25   ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).