From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Miaoqian Lin <linmq006@gmail.com>
Cc: 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,
stable@vger.kernel.org
Subject: Re: [PATCH] thunderbolt: debugfs: Fix dentry reference leaks in margining_port_init
Date: Tue, 2 Sep 2025 08:32:00 +0200 [thread overview]
Message-ID: <20250902063200.GG476609@black.igk.intel.com> (raw)
In-Reply-To: <20250901080438.2278730-1-linmq006@gmail.com>
On Mon, Sep 01, 2025 at 04:04:37PM +0800, Miaoqian Lin wrote:
> The debugfs_lookup() function returns a dentry with an increased
> reference count that must be released by calling dput().
Don't we need the same for margining_port_remove() too?
>
> 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
prev parent reply other threads:[~2025-09-02 6:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 8:04 Miaoqian Lin
2025-09-02 6:32 ` Mika Westerberg [this message]
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=20250902063200.GG476609@black.igk.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=linmq006@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
all inboxes | Powered by JetHome®