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: <20221213184522.GF5824@twin.jikos.cz>
Date:   Tue, 13 Dec 2022 19:45:23 +0100
From:   David Sterba <dsterba@...e.cz>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
        David Sterba <dsterba@...e.com>, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org,
        Chris Mason <chris.mason@...cle.com>,
        linux-btrfs@...r.kernel.org
Subject: Re: [PATCH] btrfs: Fix an error handling path in
 btrfs_defrag_leaves()

On Mon, Dec 12, 2022 at 09:01:43PM +0100, Christophe JAILLET wrote:
> All error handling paths end to 'out', except this memory allocation
> failure.
> 
> This is spurious. So branch to the error handling path also in this case.
> It will add a call to:
> 	memset(&root->defrag_progress, 0,
> 	       sizeof(root->defrag_progress));
> 
> Fixes: 6702ed490ca0 ("Btrfs: Add run time btree defrag, and an ioctl to force btree defrag")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> This patch is completely speculative.
> 
> Review with care !

I think it's correct, using goto for cleanup is for consistency and the
memset is not necessary on error paths but again for consistency with
what other types of errors in the functions lead to. Added to misc-next,
thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ