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: <20220831113627.i4qizr5rhabv2h26@quack3>
Date:   Wed, 31 Aug 2022 13:36:27 +0200
From:   Jan Kara <jack@...e.cz>
To:     Jason Yan <yanaijie@...wei.com>
Cc:     tytso@....edu, adilger.kernel@...ger.ca, jack@...e.cz,
        ritesh.list@...il.com, lczerner@...hat.com,
        linux-ext4@...r.kernel.org
Subject: Re: [PATCH 01/13] ext4: goto right label 'failed_mount3a'

On Tue 30-08-22 20:03:59, Jason Yan wrote:
> Before these two branches neither loaded the journal nor created the
> xattr cache. So the right label to goto is 'failed_mount3a'. Although
> this did not cause any issues because the error handler validated if the
> pointer is null. However this still made me confused when reading
> the code. So it's still worth to modify to goto the right label.
> 
> Signed-off-by: Jason Yan <yanaijie@...wei.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  fs/ext4/super.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 9a66abcca1a8..6126da867b26 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -5079,30 +5079,30 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
>  		   ext4_has_feature_journal_needs_recovery(sb)) {
>  		ext4_msg(sb, KERN_ERR, "required journal recovery "
>  		       "suppressed and not mounted read-only");
> -		goto failed_mount_wq;
> +		goto failed_mount3a;
>  	} else {
>  		/* Nojournal mode, all journal mount options are illegal */
>  		if (test_opt2(sb, EXPLICIT_JOURNAL_CHECKSUM)) {
>  			ext4_msg(sb, KERN_ERR, "can't mount with "
>  				 "journal_checksum, fs mounted w/o journal");
> -			goto failed_mount_wq;
> +			goto failed_mount3a;
>  		}
>  		if (test_opt(sb, JOURNAL_ASYNC_COMMIT)) {
>  			ext4_msg(sb, KERN_ERR, "can't mount with "
>  				 "journal_async_commit, fs mounted w/o journal");
> -			goto failed_mount_wq;
> +			goto failed_mount3a;
>  		}
>  		if (sbi->s_commit_interval != JBD2_DEFAULT_MAX_COMMIT_AGE*HZ) {
>  			ext4_msg(sb, KERN_ERR, "can't mount with "
>  				 "commit=%lu, fs mounted w/o journal",
>  				 sbi->s_commit_interval / HZ);
> -			goto failed_mount_wq;
> +			goto failed_mount3a;
>  		}
>  		if (EXT4_MOUNT_DATA_FLAGS &
>  		    (sbi->s_mount_opt ^ sbi->s_def_mount_opt)) {
>  			ext4_msg(sb, KERN_ERR, "can't mount with "
>  				 "data=, fs mounted w/o journal");
> -			goto failed_mount_wq;
> +			goto failed_mount3a;
>  		}
>  		sbi->s_def_mount_opt &= ~EXT4_MOUNT_JOURNAL_CHECKSUM;
>  		clear_opt(sb, JOURNAL_CHECKSUM);
> -- 
> 2.31.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ