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: <C9EBB17B-7EA2-44A3-9361-FDD09EE69FB5@gmail.com>
Date:   Tue, 6 Sep 2022 12:41:26 +0300
From:   Artem Blagodarenko <artem.blagodarenko@...il.com>
To:     Zhiqiang Liu <liuzhiqiang26@...wei.com>
Cc:     "Theodore Y. Ts'o" <tytso@....edu>,
        Ext4 Developers List <linux-ext4@...r.kernel.org>,
        linfeilong <linfeilong@...wei.com>,
        wuguanghao <wuguanghao3@...wei.com>
Subject: Re: [PATCH] tune2fs: tune2fs_main() should return rc when some error,
 occurs

Reviewed-by: Artem Blagodarenko <artem.blagodarenko@...il.com>

> On 5 Sep 2022, at 18:40, Zhiqiang Liu <liuzhiqiang26@...wei.com> wrote:
> 
> 
> If some error occurs, tune2fs_main() will go to closefs tag for
> releasing resource, and it should return correct value (rc) instead
> of 0 when ext2fs_close_free(&fs) successes.
> 
> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@...wei.com>
> ---
> misc/tune2fs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/misc/tune2fs.c b/misc/tune2fs.c
> index 25ade2fa..088f87e5 100644
> --- a/misc/tune2fs.c
> +++ b/misc/tune2fs.c
> @@ -3481,6 +3481,7 @@ _("Warning: The journal is dirty. You may wish to replay the journal like:\n\n"
> 			fputs(_("Error in using clear_mmp. "
> 				"It must be used with -f\n"),
> 			      stderr);
> +			rc = 1;
> 			goto closefs;
> 		}
> 	}
> @@ -3744,5 +3745,5 @@ closefs:
> 
> 	if (feature_64bit)
> 		convert_64bit(fs, feature_64bit);
> -	return (ext2fs_close_free(&fs) ? 1 : 0);
> +	return (ext2fs_close_free(&fs) ? 1 : rc);
> }
> -- 
> 2.33.0
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ