attempt to access beyond end of device loop4: rw=1, want=384, limit=64 gfs2: fsid=syz:syz.0: Error 10 writing to journal, jid=0 attempt to access beyond end of device loop4: rw=1, want=328, limit=64 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: 1275, name: kworker/u4:4 4 locks held by kworker/u4:4/1275: #0: ffff8881427c6138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x760/0x1000 kernel/workqueue.c:-1 #1: ffffc90004ad7d00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7a3/0x1000 kernel/workqueue.c:2285 #2: ffff888073cb10a8 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0xdb/0x2610 fs/gfs2/log.c:1035 #3: ffff888073cb0ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:364 [inline] #3: ffff888073cb0ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline] #3: ffff888073cb0ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x4e/0x80 fs/gfs2/log.c:806 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 1275 Comm: kworker/u4:4 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Workqueue: writeback wb_workfn (flush-7:4) Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 ___might_sleep+0x47c/0x600 kernel/sched/core.c:9658 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:1505 [inline] __writeback_single_inode+0x6c3/0xda0 fs/fs-writeback.c:1715 writeback_sb_inodes+0x9fe/0x1610 fs/fs-writeback.c:1940 wb_writeback+0x443/0xb90 fs/fs-writeback.c:2114 wb_do_writeback fs/fs-writeback.c:2257 [inline] wb_workfn+0x423/0xe60 fs/fs-writeback.c:2298 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 ============================= [ BUG: Invalid wait context ] syzkaller #0 Tainted: G W ----------------------------- kworker/u4:4/1275 is trying to lock: ffff88801ba43488 (&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 kworker/u4:4/1275: #0: ffff8881427c6138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x760/0x1000 kernel/workqueue.c:-1 #1: ffffc90004ad7d00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7a3/0x1000 kernel/workqueue.c:2285 #2: ffff888073cb10a8 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0xdb/0x2610 fs/gfs2/log.c:1035 #3: ffff888073cb0ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:364 [inline] #3: ffff888073cb0ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline] #3: ffff888073cb0ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x4e/0x80 fs/gfs2/log.c:806 stack backtrace: CPU: 1 PID: 1275 Comm: kworker/u4:4 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Workqueue: writeback wb_workfn (flush-7:4) 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:1505 [inline] __writeback_single_inode+0x6c3/0xda0 fs/fs-writeback.c:1715 writeback_sb_inodes+0x9fe/0x1610 fs/fs-writeback.c:1940 wb_writeback+0x443/0xb90 fs/fs-writeback.c:2114 wb_do_writeback fs/fs-writeback.c:2257 [inline] wb_workfn+0x423/0xe60 fs/fs-writeback.c:2298 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 BUG: scheduling while atomic: kworker/u4:4/1275/0x00000002 INFO: lockdep is turned off. Modules linked in: Preemption disabled at: [<0000000000000000>] 0x0