lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250902063200.GG476609@black.igk.intel.com>
Date: Tue, 2 Sep 2025 08:32:00 +0200
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Miaoqian Lin <linmq006@...il.com>
Cc: Andreas Noever <andreas.noever@...il.com>,
	Michael Jamet <michael.jamet@...el.com>,
	Mika Westerberg <westeri@...nel.org>,
	Yehezkel Bernat <YehezkelShB@...il.com>, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] thunderbolt: debugfs: Fix dentry reference leaks in
 margining_port_init

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@...r.kernel.org
> Signed-off-by: Miaoqian Lin <linmq006@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ