syz-executor.0: attempt to access beyond end of device loop0: rw=1, sector=3280942697285464, nr_sectors = 8 limit=32768 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:2081 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 2541, name: syz-executor.0 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 5 locks held by syz-executor.0/2541: #0: ffff8881012a4400 (sb_writers#14){....}-{0:0}, at: do_sendfile+0x276/0x460 fs/read_write.c:1253 #1: ffff88817cf40788 (&sb->s_type->i_mutex_key#20){....}-{3:3}, at: inode_lock include/linux/fs.h:771 [inline] #1: ffff88817cf40788 (&sb->s_type->i_mutex_key#20){....}-{3:3}, at: gfs2_file_write_iter+0x119/0x460 fs/gfs2/file.c:1114 #2: ffff88810572f058 (&sdp->sd_log_flush_lock){....}-{3:3}, at: gfs2_log_flush+0x3f/0xb00 fs/gfs2/log.c:1042 #3: ffff88810572ee80 (&sdp->sd_log_lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline] #3: ffff88810572ee80 (&sdp->sd_log_lock){....}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline] #3: ffff88810572ee80 (&sdp->sd_log_lock){....}-{2:2}, at: gfs2_flush_revokes+0x21/0x40 fs/gfs2/log.c:814 #4: ffff88810572f240 (&sdp->sd_freeze_mutex){....}-{3:3}, at: signal_our_withdraw fs/gfs2/util.c:151 [inline] #4: ffff88810572f240 (&sdp->sd_freeze_mutex){....}-{3:3}, at: gfs2_withdraw+0x15f/0x6a0 fs/gfs2/util.c:334 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 PID: 2541 Comm: syz-executor.0 Not tainted 6.4.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x83/0xd0 lib/dump_stack.c:106 __might_resched+0x19f/0x1c0 kernel/sched/core.c:10189 glock_hash_walk+0x95/0x120 fs/gfs2/glock.c:2081 gfs2_flush_delete_work+0x17/0x30 fs/gfs2/glock.c:2108 gfs2_make_fs_ro+0x3c/0x370 fs/gfs2/super.c:550 signal_our_withdraw fs/gfs2/util.c:153 [inline] gfs2_withdraw+0x16a/0x6a0 fs/gfs2/util.c:334 gfs2_ail1_empty+0x271/0x2a0 fs/gfs2/log.c:377 gfs2_flush_revokes+0x2c/0x40 fs/gfs2/log.c:815 revoke_lo_before_commit+0x16/0x2b0 fs/gfs2/lops.c:868 lops_before_commit fs/gfs2/lops.h:40 [inline] gfs2_log_flush+0x3a4/0xb00 fs/gfs2/log.c:1101 gfs2_write_inode+0x94/0x110 fs/gfs2/super.c:453 write_inode fs/fs-writeback.c:1456 [inline] __writeback_single_inode+0x18f/0x3a0 fs/fs-writeback.c:1668 writeback_single_inode+0x7c/0x240 fs/fs-writeback.c:1724 sync_inode_metadata+0x9d/0xc0 fs/fs-writeback.c:2786 gfs2_fsync+0x8a/0x100 fs/gfs2/file.c:761 generic_write_sync include/linux/fs.h:2493 [inline] gfs2_file_write_iter+0x1d4/0x460 fs/gfs2/file.c:1159 do_iter_write+0x1e5/0x300 fs/read_write.c:860 iter_file_splice_write+0x27c/0x430 fs/splice.c:739 do_splice_from fs/splice.c:934 [inline] direct_splice_actor+0x2e/0xa0 fs/splice.c:1143 splice_direct_to_actor+0xcc/0x250 fs/splice.c:1089 do_splice_direct+0x92/0xe0 fs/splice.c:1195 do_sendfile+0x291/0x460 fs/read_write.c:1254 __do_sys_sendfile64 fs/read_write.c:1322 [inline] __se_sys_sendfile64+0xa7/0xe0 fs/read_write.c:1308 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f8269c7cae9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f826aab20c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f8269d9bf80 RCX: 00007f8269c7cae9 RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000007 RBP: 00007f8269cc847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000080000001 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007f8269d9bf80 R15: 00007ffc1d2fcca8 BUG: scheduling while atomic: syz-executor.0/2541/0x00000002 5 locks held by syz-executor.0/2541: #0: ffff8881012a4400 (sb_writers#14){....}-{0:0}, at: do_sendfile+0x276/0x460 fs/read_write.c:1253 #1: ffff88817cf40788 (&sb->s_type->i_mutex_key#20){....}-{3:3}, at: inode_lock include/linux/fs.h:771 [inline] #1: ffff88817cf40788 (&sb->s_type->i_mutex_key#20){....}-{3:3}, at: gfs2_file_write_iter+0x119/0x460 fs/gfs2/file.c:1114 #2: ffff88810572f058 (&sdp->sd_log_flush_lock){....}-{3:3}, at: gfs2_log_flush+0x3f/0xb00 fs/gfs2/log.c:1042 #3: ffff88810572ee80 (&sdp->sd_log_lock){....}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline] #3: ffff88810572ee80 (&sdp->sd_log_lock){....}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline] #3: ffff88810572ee80 (&sdp->sd_log_lock){....}-{2:2}, at: gfs2_flush_revokes+0x21/0x40 fs/gfs2/log.c:814 #4: ffff88810572f240 (&sdp->sd_freeze_mutex){....}-{3:3}, at: signal_our_withdraw fs/gfs2/util.c:151 [inline] #4: ffff88810572f240 (&sdp->sd_freeze_mutex){....}-{3:3}, at: gfs2_withdraw+0x15f/0x6a0 fs/gfs2/util.c:334 Modules linked in: Preemption disabled at: [<0000000000000000>] 0x0