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: <CAL3q7H7btKGFi9iVrYgo0RoKrkW8uXBvmng0UekSLB-OhUp1WQ@mail.gmail.com>
Date: Wed, 5 Mar 2025 11:53:17 +0000
From: Filipe Manana <fdmanana@...nel.org>
To: Haoxiang Li <haoxiang_li2024@....com>
Cc: clm@...com, josef@...icpanda.com, dsterba@...e.com, fdmanana@...e.com, 
	linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org, 
	stable@...r.kernel.org
Subject: Re: [PATCH] btrfs: fix a memory leak issue in read_one_chunk()

On Mon, Mar 3, 2025 at 2:43 AM Haoxiang Li <haoxiang_li2024@....com> wrote:
>
> Add btrfs_free_chunk_map() to free the memory allocated
> by btrfs_alloc_chunk_map() if btrfs_add_chunk_map() fails.
>
> Fixes: 7dc66abb5a47 ("btrfs: use a dedicated data structure for chunk maps")
> Cc: stable@...r.kernel.org
> Signed-off-by: Haoxiang Li <haoxiang_li2024@....com>

Reviewed-by: Filipe Manana <fdmanana@...e.com>

Pushed into the github for-next branch, thanks.



> ---
>  fs/btrfs/volumes.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index fb22d4425cb0..3f8afbd1ebb5 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -7155,6 +7155,7 @@ static int read_one_chunk(struct btrfs_key *key, struct extent_buffer *leaf,
>                 btrfs_err(fs_info,
>                           "failed to add chunk map, start=%llu len=%llu: %d",
>                           map->start, map->chunk_len, ret);
> +               btrfs_free_chunk_map(map);
>         }
>
>         return ret;
> --
> 2.25.1
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ