stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miaoqian Lin <linmq006@gmail.com>
To: Andreas Noever <andreas.noever@gmail.com>,
	Michael Jamet <michael.jamet@intel.com>,
	Mika Westerberg <westeri@kernel.org>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: linmq006@gmail.com, stable@vger.kernel.org
Subject: [PATCH] thunderbolt: debugfs: Fix dentry reference leaks in margining_port_init
Date: Mon,  1 Sep 2025 16:04:37 +0800	[thread overview]
Message-ID: <20250901080438.2278730-1-linmq006@gmail.com> (raw)

The debugfs_lookup() function returns a dentry with an increased
reference count that must be released by calling dput().

Fixes: d0f1e0c2a699 ("thunderbolt: Add support for receiver lane margining")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 drivers/thunderbolt/debugfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thunderbolt/debugfs.c b/drivers/thunderbolt/debugfs.c
index f8328ca7e22e..2aadbec9a3e5 100644
--- a/drivers/thunderbolt/debugfs.c
+++ b/drivers/thunderbolt/debugfs.c
@@ -1770,6 +1770,7 @@ static void margining_port_init(struct tb_port *port)
 	port->usb4->margining = margining_alloc(port, &port->usb4->dev,
 						USB4_SB_TARGET_ROUTER, 0,
 						parent);
+	dput(parent);
 }
 
 static void margining_port_remove(struct tb_port *port)
-- 
2.35.1


             reply	other threads:[~2025-09-01  8:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-01  8:04 Miaoqian Lin [this message]
2025-09-02  6:32 ` [PATCH] thunderbolt: debugfs: Fix dentry reference leaks in margining_port_init Mika Westerberg

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=20250901080438.2278730-1-linmq006@gmail.com \
    --to=linmq006@gmail.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=michael.jamet@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=westeri@kernel.org \
    /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).