loop0: writeback error on inode 2373, offset 0, sector 18992 attempt to access beyond end of device loop0: rw=1, want=328, limit=64 gfs2: fsid=syz:syz.0: Error 10 writing to journal, jid=0 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 fs/gfs2/glock.c:1281 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5110, name: syz.0.144 4 locks held by syz.0.144/5110: #0: ffff88807a5fc460 (sb_writers#21){.+.+}-{0:0}, at: do_sendfile+0x5b2/0xec0 fs/read_write.c:1248 #1: ffff8880742ed2b0 (&sb->s_type->i_mutex_key#28){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] #1: ffff8880742ed2b0 (&sb->s_type->i_mutex_key#28){+.+.}-{3:3}, at: gfs2_file_write_iter+0x33b/0x11d0 fs/gfs2/file.c:1123 #2: ffff8880261490a8 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0xdb/0x2610 fs/gfs2/log.c:1035 #3: ffff888026148ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] #3: ffff888026148ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline] #3: ffff888026148ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x4e/0x80 fs/gfs2/log.c:806 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 PID: 5110 Comm: syz.0.144 Not tainted 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 ___might_sleep+0x47c/0x600 kernel/sched/core.c:9639 gfs2_glock_wait+0x53/0x1c0 fs/gfs2/glock.c:1281 gfs2_glock_nq_init fs/gfs2/glock.h:246 [inline] gfs2_freeze_lock+0x5a/0xc0 fs/gfs2/util.c:107 signal_our_withdraw fs/gfs2/util.c:160 [inline] gfs2_withdraw+0x5bd/0x1460 fs/gfs2/util.c:343 gfs2_ail1_empty+0x7c2/0x850 fs/gfs2/log.c:369 gfs2_flush_revokes+0x58/0x80 fs/gfs2/log.c:807 revoke_lo_before_commit+0x28/0x5f0 fs/gfs2/lops.c:872 lops_before_commit fs/gfs2/lops.h:40 [inline] gfs2_log_flush+0xbff/0x2610 fs/gfs2/log.c:1094 gfs2_write_inode+0x2a5/0x430 fs/gfs2/super.c:439 write_inode fs/fs-writeback.c:1495 [inline] __writeback_single_inode+0x6c3/0xda0 fs/fs-writeback.c:1705 writeback_single_inode+0x221/0x8b0 fs/fs-writeback.c:1760 sync_inode_metadata+0xa8/0xf0 fs/fs-writeback.c:2820 gfs2_fsync+0x1b2/0x340 fs/gfs2/file.c:765 generic_write_sync+0xa2/0xf0 include/linux/fs.h:2989 gfs2_file_write_iter+0xf64/0x11d0 fs/gfs2/file.c:1159 do_iter_readv_writev+0x497/0x600 fs/read_write.c:-1 do_iter_write+0x205/0x7b0 fs/read_write.c:855 iter_file_splice_write+0x65f/0xc40 fs/splice.c:689 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0xe1/0x130 fs/splice.c:936 splice_direct_to_actor+0x4dc/0xb50 fs/splice.c:891 do_splice_direct+0x1b9/0x2c0 fs/splice.c:979 do_sendfile+0x5d5/0xec0 fs/read_write.c:1249 __do_sys_sendfile64 fs/read_write.c:1317 [inline] __se_sys_sendfile64+0x13b/0x190 fs/read_write.c:1303 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fbd98c58be9 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:00007fbd96e9f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007fbd98e80090 RCX: 00007fbd98c58be9 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000006 RBP: 00007fbd98cdbe19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000080000002 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fbd98e80128 R14: 00007fbd98e80090 R15: 00007ffeab71f888 ============================= [ BUG: Invalid wait context ] 5.15.189-syzkaller #0 Tainted: G W ----------------------------- syz.0.144/5110 is trying to lock: ffff88801d885888 (&wq->mutex){+.+.}-{3:3}, at: flush_workqueue+0x165/0x1380 kernel/workqueue.c:2833 other info that might help us debug this: context-{4:4} 4 locks held by syz.0.144/5110: #0: ffff88807a5fc460 (sb_writers#21){.+.+}-{0:0}, at: do_sendfile+0x5b2/0xec0 fs/read_write.c:1248 #1: ffff8880742ed2b0 (&sb->s_type->i_mutex_key#28){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] #1: ffff8880742ed2b0 (&sb->s_type->i_mutex_key#28){+.+.}-{3:3}, at: gfs2_file_write_iter+0x33b/0x11d0 fs/gfs2/file.c:1123 #2: ffff8880261490a8 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0xdb/0x2610 fs/gfs2/log.c:1035 #3: ffff888026148ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] #3: ffff888026148ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline] #3: ffff888026148ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x4e/0x80 fs/gfs2/log.c:806 stack backtrace: CPU: 0 PID: 5110 Comm: syz.0.144 Tainted: G W 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_lock_invalid_wait_context kernel/locking/lockdep.c:4664 [inline] check_wait_context kernel/locking/lockdep.c:4725 [inline] __lock_acquire+0x1be9/0x7c60 kernel/locking/lockdep.c:4962 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x1eb/0x2390 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 flush_workqueue+0x165/0x1380 kernel/workqueue.c:2833 gfs2_make_fs_ro+0xd1/0x5d0 fs/gfs2/super.c:529 signal_our_withdraw fs/gfs2/util.c:166 [inline] gfs2_withdraw+0x5f9/0x1460 fs/gfs2/util.c:343 gfs2_ail1_empty+0x7c2/0x850 fs/gfs2/log.c:369 gfs2_flush_revokes+0x58/0x80 fs/gfs2/log.c:807 revoke_lo_before_commit+0x28/0x5f0 fs/gfs2/lops.c:872 lops_before_commit fs/gfs2/lops.h:40 [inline] gfs2_log_flush+0xbff/0x2610 fs/gfs2/log.c:1094 gfs2_write_inode+0x2a5/0x430 fs/gfs2/super.c:439 write_inode fs/fs-writeback.c:1495 [inline] __writeback_single_inode+0x6c3/0xda0 fs/fs-writeback.c:1705 writeback_single_inode+0x221/0x8b0 fs/fs-writeback.c:1760 sync_inode_metadata+0xa8/0xf0 fs/fs-writeback.c:2820 gfs2_fsync+0x1b2/0x340 fs/gfs2/file.c:765 generic_write_sync+0xa2/0xf0 include/linux/fs.h:2989 gfs2_file_write_iter+0xf64/0x11d0 fs/gfs2/file.c:1159 do_iter_readv_writev+0x497/0x600 fs/read_write.c:-1 do_iter_write+0x205/0x7b0 fs/read_write.c:855 iter_file_splice_write+0x65f/0xc40 fs/splice.c:689 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0xe1/0x130 fs/splice.c:936 splice_direct_to_actor+0x4dc/0xb50 fs/splice.c:891 do_splice_direct+0x1b9/0x2c0 fs/splice.c:979 do_sendfile+0x5d5/0xec0 fs/read_write.c:1249 __do_sys_sendfile64 fs/read_write.c:1317 [inline] __se_sys_sendfile64+0x13b/0x190 fs/read_write.c:1303 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fbd98c58be9 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:00007fbd96e9f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007fbd98e80090 RCX: 00007fbd98c58be9 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000006 RBP: 00007fbd98cdbe19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000080000002 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fbd98e80128 R14: 00007fbd98e80090 R15: 00007ffeab71f888 BUG: sleeping function called from invalid context at kernel/sched/completion.c:101 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5110, name: syz.0.144 INFO: lockdep is turned off. Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 PID: 5110 Comm: syz.0.144 Tainted: G W 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 ___might_sleep+0x47c/0x600 kernel/sched/core.c:9639 __wait_for_common kernel/sched/completion.c:101 [inline] wait_for_common kernel/sched/completion.c:117 [inline] wait_for_completion+0x19/0x60 kernel/sched/completion.c:138 kthread_stop+0x16e/0x540 kernel/kthread.c:666 gfs2_make_fs_ro+0x14c/0x5d0 fs/gfs2/super.c:533 signal_our_withdraw fs/gfs2/util.c:166 [inline] gfs2_withdraw+0x5f9/0x1460 fs/gfs2/util.c:343 gfs2_ail1_empty+0x7c2/0x850 fs/gfs2/log.c:369 gfs2_flush_revokes+0x58/0x80 fs/gfs2/log.c:807 revoke_lo_before_commit+0x28/0x5f0 fs/gfs2/lops.c:872 lops_before_commit fs/gfs2/lops.h:40 [inline] gfs2_log_flush+0xbff/0x2610 fs/gfs2/log.c:1094 gfs2_write_inode+0x2a5/0x430 fs/gfs2/super.c:439 write_inode fs/fs-writeback.c:1495 [inline] __writeback_single_inode+0x6c3/0xda0 fs/fs-writeback.c:1705 writeback_single_inode+0x221/0x8b0 fs/fs-writeback.c:1760 sync_inode_metadata+0xa8/0xf0 fs/fs-writeback.c:2820 gfs2_fsync+0x1b2/0x340 fs/gfs2/file.c:765 generic_write_sync+0xa2/0xf0 include/linux/fs.h:2989 gfs2_file_write_iter+0xf64/0x11d0 fs/gfs2/file.c:1159 do_iter_readv_writev+0x497/0x600 fs/read_write.c:-1 do_iter_write+0x205/0x7b0 fs/read_write.c:855 iter_file_splice_write+0x65f/0xc40 fs/splice.c:689 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0xe1/0x130 fs/splice.c:936 splice_direct_to_actor+0x4dc/0xb50 fs/splice.c:891 do_splice_direct+0x1b9/0x2c0 fs/splice.c:979 do_sendfile+0x5d5/0xec0 fs/read_write.c:1249 __do_sys_sendfile64 fs/read_write.c:1317 [inline] __se_sys_sendfile64+0x13b/0x190 fs/read_write.c:1303 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fbd98c58be9 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:00007fbd96e9f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007fbd98e80090 RCX: 00007fbd98c58be9 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000006 RBP: 00007fbd98cdbe19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000080000002 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fbd98e80128 R14: 00007fbd98e80090 R15: 00007ffeab71f888 BUG: scheduling while atomic: syz.0.144/5110/0x00000002 INFO: lockdep is turned off. Modules linked in: Preemption disabled at: [<0000000000000000>] 0x0