gfs2: fsid=syz:syz.0: fatal: I/O error(s) gfs2: fsid=syz:syz.0: about to withdraw this file system BUG: sleeping function called from invalid context at kernel/sched/completion.c:101 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5925, name: syz.5.338 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 6 locks held by syz.5.338/5925: #0: ffff88807dbc9268 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2ae/0x360 fs/file.c:1038 #1: ffff88807a786460 (sb_writers#17){.+.+}-{0:0}, at: vfs_write+0x256/0x960 fs/read_write.c:580 #2: ffff888049458150 (&sb->s_type->i_mutex_key#24){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #2: ffff888049458150 (&sb->s_type->i_mutex_key#24){+.+.}-{3:3}, at: gfs2_file_write_iter+0x308/0xdf0 fs/gfs2/file.c:1115 #3: ffff88804f135058 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0xd9/0x24e0 fs/gfs2/log.c:1043 #4: ffff88804f134e80 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #4: ffff88804f134e80 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline] #4: ffff88804f134e80 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x4e/0x80 fs/gfs2/log.c:814 #5: ffff88804f135248 (&sdp->sd_freeze_mutex){+.+.}-{3:3}, at: signal_our_withdraw fs/gfs2/util.c:155 [inline] #5: ffff88804f135248 (&sdp->sd_freeze_mutex){+.+.}-{3:3}, at: gfs2_withdraw+0x5d0/0x1780 fs/gfs2/util.c:354 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 PID: 5925 Comm: syz.5.338 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 __might_resched+0x48d/0x610 kernel/sched/core.c:9966 __wait_for_common kernel/sched/completion.c:101 [inline] wait_for_common kernel/sched/completion.c:117 [inline] wait_for_completion+0x8e/0x590 kernel/sched/completion.c:138 kthread_stop+0x197/0x650 kernel/kthread.c:711 signal_our_withdraw fs/gfs2/util.c:159 [inline] gfs2_withdraw+0x643/0x1780 fs/gfs2/util.c:354 gfs2_ail1_empty+0x7be/0x850 fs/gfs2/log.c:377 gfs2_flush_revokes+0x58/0x80 fs/gfs2/log.c:815 revoke_lo_before_commit+0x28/0x5f0 fs/gfs2/lops.c:869 lops_before_commit fs/gfs2/lops.h:40 [inline] gfs2_log_flush+0xb83/0x24e0 fs/gfs2/log.c:1102 gfs2_write_inode+0x23b/0x3d0 fs/gfs2/super.c:453 write_inode fs/fs-writeback.c:1470 [inline] __writeback_single_inode+0x75b/0x1160 fs/fs-writeback.c:1687 writeback_single_inode+0x221/0x8b0 fs/fs-writeback.c:1743 sync_inode_metadata+0xb6/0x110 fs/fs-writeback.c:2800 gfs2_fsync+0x1b2/0x340 fs/gfs2/file.c:758 generic_write_sync+0x18d/0x200 include/linux/fs.h:2962 gfs2_file_write_iter+0xb85/0xdf0 fs/gfs2/file.c:1151 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x44c/0x960 fs/read_write.c:584 ksys_write+0x143/0x240 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f603238efc9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f60331f9038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f60325e6090 RCX: 00007f603238efc9 RDX: 0000000000000010 RSI: 0000200000000100 RDI: 0000000000000004 RBP: 00007f6032411f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f60325e6128 R14: 00007f60325e6090 R15: 00007ffd524e1ac8 BUG: scheduling while atomic: syz.5.338/5925/0x00000002 6 locks held by syz.5.338/5925: #0: ffff88807dbc9268 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2ae/0x360 fs/file.c:1038 #1: ffff88807a786460 (sb_writers#17){.+.+}-{0:0}, at: vfs_write+0x256/0x960 fs/read_write.c:580 #2: ffff888049458150 (&sb->s_type->i_mutex_key#24){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #2: ffff888049458150 (&sb->s_type->i_mutex_key#24){+.+.}-{3:3}, at: gfs2_file_write_iter+0x308/0xdf0 fs/gfs2/file.c:1115 #3: ffff88804f135058 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0xd9/0x24e0 fs/gfs2/log.c:1043 #4: ffff88804f134e80 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #4: ffff88804f134e80 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline] #4: ffff88804f134e80 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x4e/0x80 fs/gfs2/log.c:814 #5: ffff88804f135248 (&sdp->sd_freeze_mutex){+.+.}-{3:3}, at: signal_our_withdraw fs/gfs2/util.c:155 [inline] #5: ffff88804f135248 (&sdp->sd_freeze_mutex){+.+.}-{3:3}, at: gfs2_withdraw+0x5d0/0x1780 fs/gfs2/util.c:354 Modules linked in: Preemption disabled at: [<0000000000000000>] 0x0