diff options
| author | Hemanth Selam <hemanth.selam@gmail.com> | 2026-08-24 15:15:12 +0530 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2026-10-08 11:06:03 -0400 |
| commit | 418adcde99032194416248168df810535a1a93f9 (patch) | |
| tree | 3ea5c5163cbd687f116564c8394439f355f8dc36 /scripts/Makefile.thinlto | |
| parent | 9f359c031885bb50add7d23c7a5a0e9755b134c9 (diff) | |
| download | linux-418adcde99032194416248168df810535a1a93f9.tar.gz linux-418adcde99032194416248168df810535a1a93f9.zip | |
ext4: skip extra isize expansion while unmounting
syzbot reports a WARN from ext4_xattr_inode_create() reached through the
unmount path:
EXT4-fs warning (device loop0): ext4_xattr_inode_create:1485: refuse to
create EA inode when umounting
WARNING: fs/ext4/xattr.c:1486 at ext4_xattr_inode_lookup_create
ext4_xattr_block_set
ext4_expand_extra_isize_ea
__ext4_expand_extra_isize
__ext4_mark_inode_dirty
ext4_dirty_inode
__mark_inode_dirty
sync_lazytime
iput
dentry_kill
shrink_dentry_list
shrink_dcache_for_umount
generic_shutdown_super
kill_block_super
ext4_kill_sb
shrink_dcache_for_umount() clears s_root before generic_shutdown_super()
clears SB_ACTIVE, so during the dcache shrink the last iput() of a
lazytime inode still redirties it and reaches the isize expansion. The
expansion can move xattrs out to a block, and creating the EA inode for
them needs s_root, which ext4_xattr_inode_create() refuses without.
ext4_try_to_expand_extra_isize() already declines to expand when the
superblock is not active, but that test does not cover this window.
Decline while s_root is gone as well. The expansion is best effort and
__ext4_mark_inode_dirty() ignores its return value, so nothing else
changes; the inode can be expanded on a later mount.
Running the syzbot reproducer for 60 seconds produced 3583 splats before
this change and none after it, with the same number of mount cycles.
Cc: stable@kernel.org
Reported-by: syzbot+4b03894b6ec5753ddf24@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=4b03894b6ec5753ddf24
Fixes: f31173c19901 ("ext4: refuse to create ea block when umounted")
Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Link: https://patch.msgid.link/20260824094512.2436628-1-hemanth.selam@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
