Skip to content

Commit ff46e2e

Browse files
YuuoniyMiriam-Rachel
authored andcommitted
wifi: iwlwifi: Fix dentry reference leak in iwl_mld_add_link_debugfs
The debugfs_lookup() function increases the dentry reference count. Add missing dput() call to release the reference when the "iwlmld" directory already exists. Fixes: d1e879e ("wifi: iwlwifi: add iwlmld sub-driver") Cc: [email protected] Signed-off-by: Miaoqian Lin <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Miri Korenblit <[email protected]>
1 parent 0d2ab5f commit ff46e2e

File tree

1 file changed

+5
-1
lines changed
  • drivers/net/wireless/intel/iwlwifi/mld

1 file changed

+5
-1
lines changed

drivers/net/wireless/intel/iwlwifi/mld/debugfs.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,8 +1001,12 @@ void iwl_mld_add_link_debugfs(struct ieee80211_hw *hw,
10011001
* If not, this is a per-link dir of a MLO vif, add in it the iwlmld
10021002
* dir.
10031003
*/
1004-
if (!mld_link_dir)
1004+
if (!mld_link_dir) {
10051005
mld_link_dir = debugfs_create_dir("iwlmld", dir);
1006+
} else {
1007+
/* Release the reference from debugfs_lookup */
1008+
dput(mld_link_dir);
1009+
}
10061010
}
10071011

10081012
static ssize_t _iwl_dbgfs_fixed_rate_write(struct iwl_mld *mld, char *buf,

0 commit comments

Comments
 (0)