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: <20260106123845.GD21071@twin.jikos.cz>
Date: Tue, 6 Jan 2026 13:38:45 +0100
From: David Sterba <dsterba@...e.cz>
To: Zilin Guan <zilin@....edu.cn>
Cc: clm@...com, dsterba@...e.com, sunk67188@...il.com,
	dan.carpenter@...aro.org, linux-btrfs@...r.kernel.org,
	linux-kernel@...r.kernel.org, jianhao.xu@....edu.cn
Subject: Re: [PATCH v2] btrfs: tests: Fix memory leak in btrfs_test_qgroups()

On Fri, Dec 26, 2025 at 11:30:22AM +0000, Zilin Guan wrote:
> If btrfs_insert_fs_root() fails, the tmp_root allocated by
> btrfs_alloc_dummy_root() is leaked because its initial reference count
> is not decremented.
> 
> Fix this by calling btrfs_put_root() unconditionally after
> btrfs_insert_fs_root(). This ensures the local reference is always
> dropped.
> 
> Also fix a copy-paste error in the error message where the subvolume
> root insertion failure was incorrectly logged as "fs root".
> 
> Co-developed-by: Jianhao Xu <jianhao.xu@....edu.cn>
> Signed-off-by: Jianhao Xu <jianhao.xu@....edu.cn>
> Signed-off-by: Zilin Guan <zilin@....edu.cn>
> ---
> Changes in v2:
> - Reword commit message to be more concise.
> - Fix copy-paste error in the error message.
> - Add Co-developed-by and Signed-off-by tag.

Added to for-next, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ