From: Miaoqian Lin <linmq006@gmail.com>
To: Miri Korenblit <miriam.rachel.korenblit@intel.com>,
Johannes Berg <johannes.berg@intel.com>,
Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>,
Benjamin Berg <benjamin.berg@intel.com>,
Avraham Stern <avraham.stern@intel.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
Rotem Kerem <rotem.kerem@intel.com>,
Daniel Gabay <daniel.gabay@intel.com>,
Yedidya Benshimol <yedidya.ben.shimol@intel.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: linmq006@gmail.com, stable@vger.kernel.org
Subject: [PATCH] wifi: iwlwifi: Fix dentry reference leak in iwl_mld_add_link_debugfs
Date: Tue, 2 Sep 2025 12:09:49 +0800 [thread overview]
Message-ID: <20250902040955.2362472-1-linmq006@gmail.com> (raw)
The debugfs_lookup() function increases the dentry reference count.
Add missing dput() call to release the reference when the "iwlmld"
directory already exists.
Fixes: d1e879ec600f ("wifi: iwlwifi: add iwlmld sub-driver")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/net/wireless/intel/iwlwifi/mld/debugfs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
index cc052b0aa53f..372204bf8452 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
@@ -1001,8 +1001,12 @@ void iwl_mld_add_link_debugfs(struct ieee80211_hw *hw,
* If not, this is a per-link dir of a MLO vif, add in it the iwlmld
* dir.
*/
- if (!mld_link_dir)
+ if (!mld_link_dir) {
mld_link_dir = debugfs_create_dir("iwlmld", dir);
+ } else {
+ /* Release the reference from debugfs_lookup */
+ dput(mld_link_dir);
+ }
}
static ssize_t _iwl_dbgfs_fixed_rate_write(struct iwl_mld *mld, char *buf,
--
2.35.1
reply other threads:[~2025-09-02 4:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250902040955.2362472-1-linmq006@gmail.com \
--to=linmq006@gmail.com \
--cc=avraham.stern@intel.com \
--cc=benjamin.berg@intel.com \
--cc=dan.carpenter@linaro.org \
--cc=daniel.gabay@intel.com \
--cc=johannes.berg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miriam.rachel.korenblit@intel.com \
--cc=pagadala.yesu.anjaneyulu@intel.com \
--cc=rotem.kerem@intel.com \
--cc=stable@vger.kernel.org \
--cc=yedidya.ben.shimol@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).