Re: [syzbot ci] Re: ext4: deferred iput framework for EA inodes

Jan Kara <[email protected]>
Newsgroups dev.linux.lists.syzbot,org.kernel.vger.linux-ext4,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel
Message-ID <j6ftvy7a3w7js4whqps3fipbah452xhro37kxvkruoeobtlonb@zrp2pwoif3pc>
On Thu 02-07-26 15:57:01, syzbot ci wrote:
> syzbot ci has tested the following series
> 
> [v13] ext4: deferred iput framework for EA inodes
> https://lore.kernel.org/all/[email protected]
> * [PATCH v13 1/4] fs: add iput_if_not_last() helper
> * [PATCH v13 2/4] ext4: introduce ext4_put_ea_inode() for safe deferred iput
> * [PATCH v13 3/4] ext4: convert all EA inode iput() calls to ext4_put_ea_inode()
> * [PATCH v13 4/4] ext4: remove ea_inode_array mechanism in favor of ext4_put_ea_inode()
> 
> and found the following issue:
> WARNING in ext4_journal_check_start

Good catch. We need to flush the pending work with iputs also in
ext4_sync_fs() which should also take care of this race with remount
read-only (and the same issue with filesystem freezing etc.).

								Honza

> 
> Full report is available here:
> https://ci.syzbot.org/series/ce304d7b-7f32-44b5-bf6f-e579abb42a5c
> 
> ***
> 
> WARNING in ext4_journal_check_start
> 
> tree:      torvalds
> URL:       https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
> base:      4a50a141f05a8d1737661b19ee22ff8455b94409
> arch:      amd64
> compiler:  Debian clang version 22.1.6 (++20260514074242+fc4aad7b5db3-1~exp1~20260514074407.73), Debian LLD 22.1.6
> config:    https://ci.syzbot.org/builds/e5413370-cf09-4540-b9d3-7d280f314ae0/config
> syz repro: https://ci.syzbot.org/findings/e7cd69b7-8bb9-4554-bd84-b5ebcd7a8089/syz_repro
> 
> ------------[ cut here ]------------
> sb_rdonly(sb)
> WARNING: fs/ext4/ext4_jbd2.c:75 at ext4_journal_check_start+0x24f/0x2b0 fs/ext4/ext4_jbd2.c:75, CPU#0: kworker/0:5/5860
> Modules linked in:
> CPU: 0 UID: 0 PID: 5860 Comm: kworker/0:5 Not tainted syzkaller #0 PREEMPT(full) 
> Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
> Workqueue: events ext4_ea_inode_work
> RIP: 0010:ext4_journal_check_start+0x24f/0x2b0 fs/ext4/ext4_jbd2.c:75
> Code: 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc e8 06 75 42 ff 41 bf fb ff ff ff eb e0 e8 f9 74 42 ff eb d3 e8 f2 74 42 ff 90 <0f> 0b 90 eb c8 e8 e7 74 42 ff 90 0f 0b 90 43 80 7c 25 00 00 0f 85
> RSP: 0018:ffffc900036bf888 EFLAGS: 00010293
> RAX: ffffffff8283ecce RBX: ffff888170078000 RCX: ffff888107390000
> RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
> RBP: 00000000000000ef R08: ffff8881bb53440f R09: 1ffff110376a6881
> R10: dffffc0000000000 R11: ffffed10376a6882 R12: dffffc0000000000
> R13: 1ffff1102e00f0cd R14: ffff888170078668 R15: 0000000000000001
> FS:  0000000000000000(0000) GS:ffff88818dc20000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 000055557b325a28 CR3: 0000000114bfe000 CR4: 00000000000006f0
> Call Trace:
>  <TASK>
>  __ext4_journal_start_sb+0x147/0x5d0 fs/ext4/ext4_jbd2.c:107
>  __ext4_journal_start fs/ext4/ext4_jbd2.h:242 [inline]
>  ext4_evict_inode+0x7cb/0xf70 fs/ext4/inode.c:238
>  evict+0x624/0xb50 fs/inode.c:825
>  ext4_ea_inode_work+0x5c/0x90 fs/ext4/xattr.c:2974
>  process_one_work kernel/workqueue.c:3322 [inline]
>  process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
>  worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486
>  kthread+0x388/0x470 kernel/kthread.c:436
>  ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
>  ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
>  </TASK>
> 
> 
> ***
> 
> If these findings have caused you to resend the series or submit a
> separate fix, please add the following tag to your commit message:
>   Tested-by: [email protected]
> 
> ---
> This report is generated by a bot. It may contain errors.
> syzbot ci engineers can be reached at [email protected].
> 
> To test a patch for this bug, please reply with `#syz test`
> (should be on a separate line).
> 
> The patch should be attached to the email.
> Note: arguments like custom git repos and branches are not supported.
-- 
Jan Kara <[email protected]>
SUSE Labs, CR
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.