loop0: detected capacity change from 0 to 32768
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS (format 1801)...
gfs2: fsid=syz:syz.0: journal 0 mapped with 1 extents in 0ms
gfs2: fsid=syz:syz.0: first mount done, others may mount
syz.0.0: attempt to access beyond end of device
loop0: rw=1, sector=15034, nr_sectors = 1626 limit=8
gfs2: fsid=syz:syz.0: Error -5 writing to journal, jid=0
gfs2: fsid=syz:syz.0: about to withdraw this file system
gfs2: fsid=syz:syz.0: Journal recovery skipped for jid 0 until next mount.
gfs2: fsid=syz:syz.0: Glock dequeues delayed: 0
gfs2: fsid=syz:syz.0: File system withdrawn
CPU: 0 UID: 0 PID: 5331 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
gfs2_withdraw+0xb30/0x1430 fs/gfs2/util.c:345
revoke_lo_before_commit+0x2f/0xe60 fs/gfs2/lops.c:857
lops_before_commit fs/gfs2/lops.h:42 [inline]
gfs2_log_flush+0xb8b/0x24c0 fs/gfs2/log.c:1105
gfs2_inplace_reserve+0x16d9/0x32f0 fs/gfs2/rgrp.c:2186
gfs2_iomap_begin_write fs/gfs2/bmap.c:1040 [inline]
gfs2_iomap_begin+0x7a3/0x11c0 fs/gfs2/bmap.c:1133
iomap_iter+0x534/0xde0 fs/iomap/iter.c:108
iomap_file_buffered_write+0x7fa/0x9b0 fs/iomap/buffered-io.c:1070
gfs2_file_buffered_write+0x4ed/0x880 fs/gfs2/file.c:1061
gfs2_file_write_iter+0x94e/0x1100 fs/gfs2/file.c:1166
new_sync_write fs/read_write.c:593 [inline]
vfs_write+0x5c9/0xb30 fs/read_write.c:686
ksys_write+0x145/0x250 fs/read_write.c:738
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb9b858f749
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:00007fb9b9363038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fb9b87e5fa0 RCX: 00007fb9b858f749
RDX: 00000000ffffff6a RSI: 0000200000000000 RDI: 0000000000000006
RBP: 00007fb9b8613f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb9b87e6038 R14: 00007fb9b87e5fa0 R15: 00007ffcabdb79f8
==================================================================
BUG: KASAN: slab-use-after-free in list_empty include/linux/list.h:381 [inline]
BUG: KASAN: slab-use-after-free in gfs2_discard fs/gfs2/aops.c:593 [inline]
BUG: KASAN: slab-use-after-free in gfs2_invalidate_folio+0x40b/0x750 fs/gfs2/aops.c:631
Read of size 8 at addr ffff8880541ad018 by task syz.0.0/5331
CPU: 0 UID: 0 PID: 5331 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
list_empty include/linux/list.h:381 [inline]
gfs2_discard fs/gfs2/aops.c:593 [inline]
gfs2_invalidate_folio+0x40b/0x750 fs/gfs2/aops.c:631
folio_invalidate mm/truncate.c:140 [inline]
truncate_cleanup_folio+0x2d8/0x430 mm/truncate.c:160
truncate_inode_pages_range+0x233/0xda0 mm/truncate.c:404
gfs2_evict_inode+0x87a/0x1000 fs/gfs2/super.c:1439
evict+0x504/0x9c0 fs/inode.c:810
gfs2_evict_inodes fs/gfs2/ops_fstype.c:1763 [inline]
gfs2_kill_sb+0x234/0x340 fs/gfs2/ops_fstype.c:1789
deactivate_locked_super+0xbc/0x130 fs/super.c:473
cleanup_mnt+0x425/0x4c0 fs/namespace.c:1318
task_work_run+0x1d4/0x260 kernel/task_work.c:227
exit_task_work include/linux/task_work.h:40 [inline]
do_exit+0x6b5/0x2300 kernel/exit.c:966
do_group_exit+0x21c/0x2d0 kernel/exit.c:1107
get_signal+0x1285/0x1340 kernel/signal.c:3034
arch_do_signal_or_restart+0xa0/0x790 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop+0x72/0x130 kernel/entry/common.c:40
exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
do_syscall_64+0x2bd/0xfa0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb9b858f749
Code: Unable to access opcode bytes at 0x7fb9b858f71f.
RSP: 002b:00007fb9b9363038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: 00000000006b6c00 RBX: 00007fb9b87e5fa0 RCX: 00007fb9b858f749
RDX: 00000000ffffff6a RSI: 0000200000000000 RDI: 0000000000000006
RBP: 00007fb9b8613f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb9b87e6038 R14: 00007fb9b87e5fa0 R15: 00007ffcabdb79f8
Allocated by task 5331:
kasan_save_stack mm/kasan/common.c:56 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
unpoison_slab_object mm/kasan/common.c:342 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:368