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
loop0: detected capacity change from 32768 to 64
gfs2: fsid=syz:syz.0: fatal: I/O error - block = 9377, function = gfs2_pin, file = fs/gfs2/lops.c, line = 52
gfs2: fsid=syz:syz.0: about to withdraw this file system
BUG: sleeping function called from invalid context at fs/gfs2/util.c:159
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5319, name: syz.0.0
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
6 locks held by syz.0.0/5319:
#0: ffff888011fe8420 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:508
#1: ffff8880125c87e8 (&type->i_mutex_dir_key#8){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:980 [inline]
#1: ffff8880125c87e8 (&type->i_mutex_dir_key#8){+.+.}-{4:4}, at: open_last_lookups fs/namei.c:3892 [inline]
#1: ffff8880125c87e8 (&type->i_mutex_dir_key#8){+.+.}-{4:4}, at: path_openat+0x8da/0x3830 fs/namei.c:4131
#2: ffff888011fe8610 (sb_internal#2){.+.+}-{0:0}, at: gfs2_trans_begin+0x6f/0xe0 fs/gfs2/trans.c:118
#3: ffff888032ff4e50 (&sdp->sd_log_flush_lock){++++}-{4:4}, at: __gfs2_trans_begin+0x515/0x890 fs/gfs2/trans.c:87
#4: ffff888032ff4c78 (&sdp->sd_log_lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline]
#4: ffff888032ff4c78 (&sdp->sd_log_lock){+.+.}-{3:3}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline]
#4: ffff888032ff4c78 (&sdp->sd_log_lock){+.+.}-{3:3}, at: gfs2_trans_add_meta+0x156/0xa10 fs/gfs2/trans.c:265
#5: ffff888032ff4fe8 (&sdp->sd_freeze_mutex){+.+.}-{4:4}, at: signal_our_withdraw fs/gfs2/util.c:152 [inline]
#5: ffff888032ff4fe8 (&sdp->sd_freeze_mutex){+.+.}-{4:4}, at: gfs2_withdraw+0x444/0x1430 fs/gfs2/util.c:333
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 0 UID: 0 PID: 5319 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:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
__might_resched+0x495/0x610 kernel/sched/core.c:8927
signal_our_withdraw fs/gfs2/util.c:157 [inline]
gfs2_withdraw+0x492/0x1430 fs/gfs2/util.c:333
gfs2_pin+0x129/0x380 fs/gfs2/lops.c:52
gfs2_trans_add_meta+0x693/0xa10 fs/gfs2/trans.c:302
do_init_dirent+0xd0/0x370 fs/gfs2/dir.c:721
gfs2_init_dirent fs/gfs2/dir.c:742 [inline]
gfs2_dir_add+0x1b9a/0x21d0 fs/gfs2/dir.c:1814
link_dinode+0x32e/0x500 fs/gfs2/inode.c:640
gfs2_create_inode+0x126e/0x1560 fs/gfs2/inode.c:875
gfs2_atomic_open+0x116/0x200 fs/gfs2/inode.c:1387
atomic_open fs/namei.c:3656 [inline]
lookup_open fs/namei.c:3767 [inline]
open_last_lookups fs/namei.c:3895 [inline]
path_openat+0xf66/0x3830 fs/namei.c:4131
do_filp_open+0x1fa/0x410 fs/namei.c:4161
do_sys_openat2+0x121/0x1c0 fs/open.c:1437
do_sys_open fs/open.c:1452 [inline]
__do_sys_open fs/open.c:1460 [inline]
__se_sys_open fs/open.c:1456 [inline]
__x64_sys_open+0x11e/0x150 fs/open.c:1456
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:0x7f969118efc9
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:00007f96920df038 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00007f96913e5fa0 RCX: 00007f969118efc9
RDX: 0000000000000000 RSI: 0000000000109042 RDI: 0000200000000000
RBP: 00007f9691211f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f96913e6038 R14: 00007f96913e5fa0 R15: 00007ffc07c39ef8
</TASK>
BUG: scheduling while atomic: syz.0.0/5319/0x00000002
6 locks held by syz.0.0/5319:
#0: ffff888011fe8420 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:508
#1: ffff8880125c87e8 (&type->i_mutex_dir_key#8){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:980 [inline]
#1: ffff8880125c87e8 (&type->i_mutex_dir_key#8){+.+.}-{4:4}, at: open_last_lookups fs/namei.c:3892 [inline]
#1: ffff8880125c87e8 (&type->i_mutex_dir_key#8){+.+.}-{4:4}, at: path_openat+0x8da/0x3830 fs/namei.c:4131
#2: ffff888011fe8610 (sb_internal#2){.+.+}-{0:0}, at: gfs2_trans_begin+0x6f/0xe0 fs/gfs2/trans.c:118
#3: ffff888032ff4e50 (&sdp->sd_log_flush_lock){++++}-{4:4}, at: __gfs2_trans_begin+0x515/0x890 fs/gfs2/trans.c:87
#4: ffff888032ff4c78 (&sdp->sd_log_lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline]
#4: ffff888032ff4c78 (&sdp->sd_log_lock){+.+.}-{3:3}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline]
#4: ffff888032ff4c78 (&sdp->sd_log_lock){+.+.}-{3:3}, at: gfs2_trans_add_meta+0x156/0xa10 fs/gfs2/trans.c:265
#5: ffff888032ff4fe8 (&sdp->sd_freeze_mutex){+.+.}-{4:4}, at: signal_our_withdraw fs/gfs2/util.c:152 [inline]
#5: ffff888032ff4fe8 (&sdp->sd_freeze_mutex){+.+.}-{4:4}, at: gfs2_withdraw+0x444/0x1430 fs/gfs2/util.c:333
Modules linked in:
Preemption disabled at:
[<0000000000000000>] 0x0