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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a5du4tx2ugmhjwzwtkwcf2fk6jzj3athhheojitnxwcz222lxu@4ntqpbfjehgo>
Date: Tue, 4 Nov 2025 13:13:58 +0100
From: Jan Kara <jack@...e.cz>
To: Haibo Chen <haibo.chen@....com>
Cc: Theodore Ts'o <tytso@....edu>, 
	Andreas Dilger <adilger.kernel@...ger.ca>, Zhang Yi <yi.zhang@...wei.com>, Jan Kara <jack@...e.cz>, 
	linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org, imx@...ts.linux.dev
Subject: Re: [PATCH] ext4: clear i_state_flags when alloc inode

On Tue 04-11-25 16:12:24, Haibo Chen wrote:
> i_state_flags used on 32-bit archs, need to clear this flag when
> alloc inode.
> Find this issue when umount ext4, sometimes track the inode as orphan
> accidently, cause ext4 mesg dump.
> 
> Fixes: acf943e9768e ("ext4: fix checks for orphan inodes")
> Signed-off-by: Haibo Chen <haibo.chen@....com>

Looks good to me. Feel free to add:

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

								Honza

> ---
>  fs/ext4/ialloc.c | 1 -
>  fs/ext4/inode.c  | 1 -
>  fs/ext4/super.c  | 1 +
>  3 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
> index ba4fd9aba1c14de56b89ebbeb4597f7becf947ff..b20a1bf866abedf3a768ee8a147f108ea09ecb01 100644
> --- a/fs/ext4/ialloc.c
> +++ b/fs/ext4/ialloc.c
> @@ -1293,7 +1293,6 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,
>  		ei->i_csum_seed = ext4_chksum(csum, (__u8 *)&gen, sizeof(gen));
>  	}
>  
> -	ext4_clear_state_flags(ei); /* Only relevant on 32-bit archs */
>  	ext4_set_inode_state(inode, EXT4_STATE_NEW);
>  
>  	ei->i_extra_isize = sbi->s_want_extra_isize;
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index a163c087137314c541ec10c011488c5392fb7011..bf6786d373ff57c32d5a84cfd73ea8a33cb68b16 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -5285,7 +5285,6 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
>  	ei->i_projid = make_kprojid(&init_user_ns, i_projid);
>  	set_nlink(inode, le16_to_cpu(raw_inode->i_links_count));
>  
> -	ext4_clear_state_flags(ei);	/* Only relevant on 32-bit archs */
>  	ei->i_inline_off = 0;
>  	ei->i_dir_start_lookup = 0;
>  	ei->i_dtime = le32_to_cpu(raw_inode->i_dtime);
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 33e7c08c9529c357d291f40269863398753dc650..3dcc9410c09a55d5dce2dbff388a97bf4f133818 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1396,6 +1396,7 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)
>  
>  	inode_set_iversion(&ei->vfs_inode, 1);
>  	ei->i_flags = 0;
> +	ext4_clear_state_flags(ei);	/* Only relevant on 32-bit archs */
>  	spin_lock_init(&ei->i_raw_lock);
>  	ei->i_prealloc_node = RB_ROOT;
>  	atomic_set(&ei->i_prealloc_active, 0);
> 
> ---
> base-commit: 9823120909776bbca58a3c55ef1f27d49283c1f3
> change-id: 20251104-ext4-3f9647dcedd0
> 
> Best regards,
> -- 
> Haibo Chen <haibo.chen@....com>
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ