attempt to access beyond end of device
loop3: 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: 4741, name: syz.3.133
5 locks held by syz.3.133/4741:
#0: ffff88807bff1770 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2bf/0x370 fs/file.c:1056
#1: ffff888024e24460 (sb_writers#17){.+.+}-{0:0}, at: vfs_write+0x296/0xd70 fs/read_write.c:590
#2: ffff88805fd6b790 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
#2: ffff88805fd6b790 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: gfs2_file_write_iter+0x360/0x11f0 fs/gfs2/file.c:1123
#3: ffff8880788a90a8 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0x23/0x40 fs/gfs2/log.c:1173
#4: ffff8880788a8ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:364 [inline]
#4: ffff8880788a8ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline]
#4: ffff8880788a8ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x4e/0x80 fs/gfs2/log.c:807
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 1 PID: 4741 Comm: syz.3.133 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
___might_sleep+0x493/0x610 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+0x615/0x14e0 fs/gfs2/util.c:335
gfs2_ail1_empty+0x7d4/0x860 fs/gfs2/log.c:369
gfs2_flush_revokes+0x58/0x80 fs/gfs2/log.c:808
revoke_lo_before_commit+0x28/0x5e0 fs/gfs2/lops.c:872
lops_before_commit fs/gfs2/lops.h:40 [inline]
__gfs2_log_flush+0xc5c/0x25f0 fs/gfs2/log.c:1095
gfs2_log_flush+0x30/0x40 fs/gfs2/log.c:1174
gfs2_write_inode+0x2af/0x430 fs/gfs2/super.c:443
write_inode fs/fs-writeback.c:1505 [inline]
__writeback_single_inode+0x6c4/0xda0 fs/fs-writeback.c:1715
writeback_single_inode+0x3d2/0x8e0 fs/fs-writeback.c:1770
sync_inode_metadata+0xd0/0x130 fs/fs-writeback.c:2837
gfs2_fsync+0x1a7/0x330 fs/gfs2/file.c:765
generic_write_sync+0xa2/0xf0 include/linux/fs.h:2990
gfs2_file_write_iter+0xfb9/0x11f0 fs/gfs2/file.c:1159
call_write_iter include/linux/fs.h:2173 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x748/0xd70 fs/read_write.c:594
ksys_write+0x153/0x260 fs/read_write.c:647
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:0x7fc62e558e59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc62c790028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fc62e7e1090 RCX: 00007fc62e558e59
RDX: 00000000ffffffd7 RSI: 0000200000000000 RDI: 0000000000000006
RBP: 00007fc62e5eee6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc62e7e1128 R14: 00007fc62e7e1090 R15: 00007ffd26233108
=============================
[ BUG: Invalid wait context ]
syzkaller #0 Tainted: G W
-----------------------------
syz.3.133/4741 is trying to lock:
ffff88801be15888 (&wq->mutex){+.+.}-{3:3}, at: flush_workqueue+0x18e/0x1390 kernel/workqueue.c:2833
other info that might help us debug this:
context-{4:4}
5 locks held by syz.3.133/4741:
#0: ffff88807bff1770 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2bf/0x370 fs/file.c:1056
#1: ffff888024e24460 (sb_writers#17){.+.+}-{0:0}, at: vfs_write+0x296/0xd70 fs/read_write.c:590
#2: ffff88805fd6b790 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
#2: ffff88805fd6b790 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: gfs2_file_write_iter+0x360/0x11f0 fs/gfs2/file.c:1123
#3: ffff8880788a90a8 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0x23/0x40 fs/gfs2/log.c:1173
#4: ffff8880788a8ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:364 [inline]
#4: ffff8880788a8ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline]
#4: ffff8880788a8ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x4e/0x80 fs/gfs2/log.c:807
stack backtrace:
CPU: 1 PID: 4741 Comm: syz.3.133 Tainted: G W syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
dump_stack_lvl+0x188/0x250 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+0x1bb7/0x7b50 kernel/locking/lockdep.c:4962
lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1e5/0x2400 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+0x18e/0x1390 kernel/workqueue.c:2833
gfs2_make_fs_ro+0xd7/0x620 fs/gfs2/super.c:533
signal_our_withdraw fs/gfs2/util.c:166 [inline]
gfs2_withdraw+0x660/0x14e0 fs/gfs2/util.c:335
gfs2_ail1_empty+0x7d4/0x860 fs/gfs2/log.c:369
gfs2_flush_revokes+0x58/0x80 fs/gfs2/log.c:808
revoke_lo_before_commit+0x28/0x5e0 fs/gfs2/lops.c:872
lops_before_commit fs/gfs2/lops.h:40 [inline]
__gfs2_log_flush+0xc5c/0x25f0 fs/gfs2/log.c:1095
gfs2_log_flush+0x30/0x40 fs/gfs2/log.c:1174
gfs2_write_inode+0x2af/0x430 fs/gfs2/super.c:443
write_inode fs/fs-writeback.c:1505 [inline]
__writeback_single_inode+0x6c4/0xda0 fs/fs-writeback.c:1715
writeback_single_inode+0x3d2/0x8e0 fs/fs-writeback.c:1770
sync_inode_metadata+0xd0/0x130 fs/fs-writeback.c:2837
gfs2_fsync+0x1a7/0x330 fs/gfs2/file.c:765
generic_write_sync+0xa2/0xf0 include/linux/fs.h:2990
gfs2_file_write_iter+0xfb9/0x11f0 fs/gfs2/file.c:1159
call_write_iter include/linux/fs.h:2173 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x748/0xd70 fs/read_write.c:594
ksys_write+0x153/0x260 fs/read_write.c:647
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:0x7fc62e558e59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc62c790028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fc62e7e1090 RCX: 00007fc62e558e59
RDX: 00000000ffffffd7 RSI: 0000200000000000 RDI: 0000000000000006
RBP: 00007fc62e5eee6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc62e7e1128 R14: 00007fc62e7e1090 R15: 00007ffd26233108
BUG: sleeping function called from invalid context at kernel/sched/completion.c:101
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 4741, name: syz.3.133
INFO: lockdep is turned off.
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 1 PID: 4741 Comm: syz.3.133 Tainted: G W syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
___might_sleep+0x493/0x610 kernel/sched/core.c:9658
__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+0x157/0x620 fs/gfs2/super.c:537
signal_our_withdraw fs/gfs2/util.c:166 [inline]
gfs2_withdraw+0x660/0x14e0 fs/gfs2/util.c:335
gfs2_ail1_empty+0x7d4/0x860 fs/gfs2/log.c:369
gfs2_flush_revokes+0x58/0x80 fs/gfs2/log.c:808
revoke_lo_before_commit+0x28/0x5e0 fs/gfs2/lops.c:872
lops_before_commit fs/gfs2/lops.h:40 [inline]
__gfs2_log_flush+0xc5c/0x25f0 fs/gfs2/log.c:1095
gfs2_log_flush+0x30/0x40 fs/gfs2/log.c:1174
gfs2_write_inode+0x2af/0x430 fs/gfs2/super.c:443
write_inode fs/fs-writeback.c:1505 [inline]
__writeback_single_inode+0x6c4/0xda0 fs/fs-writeback.c:1715
writeback_single_inode+0x3d2/0x8e0 fs/fs-writeback.c:1770
sync_inode_metadata+0xd0/0x130 fs/fs-writeback.c:2837
gfs2_fsync+0x1a7/0x330 fs/gfs2/file.c:765
generic_write_sync+0xa2/0xf0 include/linux/fs.h:2990
gfs2_file_write_iter+0xfb9/0x11f0 fs/gfs2/file.c:1159
call_write_iter include/linux/fs.h:2173 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x748/0xd70 fs/read_write.c:594
ksys_write+0x153/0x260 fs/read_write.c:647
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:0x7fc62e558e59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc62c790028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fc62e7e1090 RCX: 00007fc62e558e59
RDX: 00000000ffffffd7 RSI: 0000200000000000 RDI: 0000000000000006
RBP: 00007fc62e5eee6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc62e7e1128 R14: 00007fc62e7e1090 R15: 00007ffd26233108
BUG: scheduling while atomic: syz.3.133/4741/0x00000002
INFO: lockdep is turned off.
Modules linked in:
Preemption disabled at:
[<0000000000000000>] 0x0