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] [thread-next>] [day] [month] [year] [list]
Message-ID: <2e943abf-2adc-4726-85db-c2ee5dd97017@wdc.com>
Date: Wed, 8 Oct 2025 12:04:12 +0000
From: Johannes Thumshirn <Johannes.Thumshirn@....com>
To: Miquel Sabaté Solà <mssola@...ola.com>,
	"linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>
CC: "clm@...com" <clm@...com>, "dsterba@...e.com" <dsterba@...e.com>, Naohiro
 Aota <Naohiro.Aota@....com>, "boris@....io" <boris@....io>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] btrfs: fix memory leaks when rejecting a non SINGLE
 data profile without an RST

On 10/8/25 9:41 AM, Miquel Sabaté Solà wrote:
> diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
> index e3341a84f4ab..8f767a6cd49b 100644
> --- a/fs/btrfs/zoned.c
> +++ b/fs/btrfs/zoned.c
> @@ -1753,7 +1753,11 @@ int btrfs_load_block_group_zone_info(struct btrfs_block_group *cache, bool new)
>   	    !fs_info->stripe_root) {
>   		btrfs_err(fs_info, "zoned: data %s needs raid-stripe-tree",
>   			  btrfs_bg_type_to_raid_name(map->type));
> -		return -EINVAL;
> +		/*
> +		 * Note that this might be overwritten by later if statements,
> +		 * but the error will be at least printed by the line above.
> +		 */


Not convinced the comment is useful.

> +		ret = -EINVAL;
>   	}
>   
>   	if (unlikely(cache->alloc_offset > cache->zone_capacity)) {
> @@ -1785,6 +1789,7 @@ int btrfs_load_block_group_zone_info(struct btrfs_block_group *cache, bool new)
>   		btrfs_free_chunk_map(cache->physical_map);
>   		cache->physical_map = NULL;
>   	}
> +
>   	bitmap_free(active);
>   	kfree(zone_info);
>   


Stray newline.

Other than that,

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ