function = gfs2_dinode_in, file = fs/gfs2/glops.c, line = 460
gfs2: fsid=syz:syz.0: G: s:EX n:2/924 f:qobnN t:EX d:EX/0 a:0 v:0 r:3 m:20 p:1
gfs2: fsid=syz:syz.0: H: s:EX f:H e:0 p:5533 [syz-executor.0] gfs2_quota_sync+0x3da/0x8b0 fs/gfs2/quota.c:1318
gfs2: fsid=syz:syz.0: I: n:11/2340 t:8 f:0x00 d:0x00000201 s:176 p:0
gfs2: fsid=syz:syz.0: about to withdraw this file system
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5533, name: syz-executor.0
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
4 locks held by syz-executor.0/5533:
#0: ffff88807d0f40e0 (&type->s_umount_key#50){+.+.}-{3:3}, at: deactivate_super+0x96/0xd0 fs/super.c:362
#1: ffff888078da4b70 (&sdp->sd_quota_sync_mutex){+.+.}-{3:3}, at: gfs2_quota_sync+0x9b/0x8b0 fs/gfs2/quota.c:1302
#2: ffff888073181578 (&gfs2_quota_imutex_key){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline]
#2: ffff888073181578 (&gfs2_quota_imutex_key){+.+.}-{3:3}, at: do_sync+0x300/0xc80 fs/gfs2/quota.c:908
#3: ffffffff8d88d8f8 (qd_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline]
#3: ffffffff8d88d8f8 (qd_lock){+.+.}-{2:2}, at: gfs2_quota_cleanup+0x33/0x6d0 fs/gfs2/quota.c:1459
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 1 PID: 5533 Comm: syz-executor.0 Not tainted 6.2.0-rc1-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1b1/0x290 lib/dump_stack.c:106
__might_resched+0x4e9/0x6b0 kernel/sched/core.c:9985
__mutex_lock_common+0xba/0x26e0 kernel/locking/mutex.c:580
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
gfs2_quota_cleanup+0x4a/0x6d0 fs/gfs2/quota.c:1460
gfs2_make_fs_ro+0x517/0x610 fs/gfs2/super.c:560
signal_our_withdraw fs/gfs2/util.c:166 [inline]
gfs2_withdraw+0x609/0x1540 fs/gfs2/util.c:351
gfs2_dinode_in fs/gfs2/glops.c:460 [inline]
gfs2_inode_refresh+0xb2d/0xf60 fs/gfs2/glops.c:480
gfs2_instantiate+0x15e/0x220 fs/gfs2/glock.c:456
gfs2_glock_holder_ready fs/gfs2/glock.c:1299 [inline]
gfs2_glock_wait+0x1d9/0x2a0 fs/gfs2/glock.c:1319
gfs2_glock_nq_init fs/gfs2/glock.h:262 [inline]
do_sync+0x485/0xc80 fs/gfs2/quota.c:916
gfs2_quota_sync+0x3da/0x8b0 fs/gfs2/quota.c:1318
gfs2_sync_fs+0x49/0xb0 fs/gfs2/super.c:650
sync_filesystem+0xe8/0x220 fs/sync.c:56
generic_shutdown_super+0x6b/0x310 fs/super.c:474
kill_block_super+0x79/0xd0 fs/super.c:1386
deactivate_locked_super+0xa7/0xf0 fs/super.c:332
cleanup_mnt+0x494/0x520 fs/namespace.c:1291
task_work_run+0x243/0x300 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0x124/0x150 kernel/entry/common.c:171
exit_to_user_mode_prepare+0xb2/0x140 kernel/entry/common.c:203
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x26/0x60 kernel/entry/common.c:296
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fbf69e8d517
Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd8dce68c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fbf69e8d517
RDX: 00007ffd8dce6999 RSI: 000000000000000a RDI: 00007ffd8dce6990
RBP: 00007ffd8dce6990 R08: 00000000ffffffff R09: 00007ffd8dce6760
R10: 0000555555d798b3 R11: 0000000000000246 R12: 00007fbf69ee6b24
R13: 00007ffd8dce7a50 R14: 0000555555d79810 R15: 00007ffd8dce7a90
=============================
[ BUG: Invalid wait context ]
6.2.0-rc1-syzkaller-dirty #0 Tainted: G W
-----------------------------
syz-executor.0/5533 is trying to lock:
ffff888078da4b70 (&sdp->sd_quota_sync_mutex){+.+.}-{3:3}, at: gfs2_quota_cleanup+0x4a/0x6d0 fs/gfs2/quota.c:1460
other info that might help us debug this:
context-{4:4}
4 locks held by syz-executor.0/5533:
#0: ffff88807d0f40e0 (&type->s_umount_key#50){+.+.}-{3:3}, at: deactivate_super+0x96/0xd0 fs/super.c:362
#1: ffff888078da4b70 (&sdp->sd_quota_sync_mutex){+.+.}-{3:3}, at: gfs2_quota_sync+0x9b/0x8b0 fs/gfs2/quota.c:1302
#2: ffff888073181578 (&gfs2_quota_imutex_key){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline]
#2: ffff888073181578 (&gfs2_quota_imutex_key){+.+.}-{3:3}, at: do_sync+0x300/0xc80 fs/gfs2/quota.c:908
#3: ffffffff8d88d8f8 (qd_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline]
#3: ffffffff8d88d8f8 (qd_lock){+.+.}-{2:2}, at: gfs2_quota_cleanup+0x33/0x6d0 fs/gfs2/quota.c:1459
stack backtrace:
CPU: 1 PID: 5533 Comm: syz-executor.0 Tainted: G W 6.2.0-rc1-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1b1/0x290 lib/dump_stack.c:106
print_lock_invalid_wait_context kernel/locking/lockdep.c:4707 [inline]
check_wait_context kernel/locking/lockdep.c:4768 [inline]
__lock_acquire+0x14f2/0x1f60 kernel/locking/lockdep.c:5005
lock_acquire+0x182/0x3c0 kernel/locking/lockdep.c:5668
__mutex_lock_common+0x1bd/0x26e0 kernel/locking/mutex.c:603
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
gfs2_quota_cleanup+0x4a/0x6d0 fs/gfs2/quota.c:1460
gfs2_make_fs_ro+0x517/0x610 fs/gfs2/super.c:560
signal_our_withdraw fs/gfs2/util.c:166 [inline]
gfs2_withdraw+0x609/0x1540 fs/gfs2/util.c:351
gfs2_dinode_in fs/gfs2/glops.c:460 [inline]
gfs2_inode_refresh+0xb2d/0xf60 fs/gfs2/glops.c:480
gfs2_instantiate+0x15e/0x220 fs/gfs2/glock.c:456
gfs2_glock_holder_ready fs/gfs2/glock.c:1299 [inline]
gfs2_glock_wait+0x1d9/0x2a0 fs/gfs2/glock.c:1319
gfs2_glock_nq_init fs/gfs2/glock.h:262 [inline]
do_sync+0x485/0xc80 fs/gfs2/quota.c:916
gfs2_quota_sync+0x3da/0x8b0 fs/gfs2/quota.c:1318
gfs2_sync_fs+0x49/0xb0 fs/gfs2/super.c:650
sync_filesystem+0xe8/0x220 fs/sync.c:56
generic_shutdown_super+0x6b/0x310 fs/super.c:474
kill_block_super+0x79/0xd0 fs/super.c:1386
deactivate_locked_super+0xa7/0xf0 fs/super.c:332
cleanup_mnt+0x494/0x520 fs/namespace.c:1291
task_work_run+0x243/0x300 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0x124/0x150 kernel/entry/common.c:171
exit_to_user_mode_prepare+0xb2/0x140 kernel/entry/common.c:203
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x26/0x60 kernel/entry/common.c:296
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fbf69e8d517
Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd8dce68c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fbf69e8d517
RDX: 00007ffd8dce6999 RSI: 000000000000000a RDI: 00007ffd8dce6990
RBP: 00007ffd8dce6990 R08: 00000000ffffffff R09: 00007ffd8dce6760
R10: 0000555555d798b3 R11: 0000000000000246 R12: 00007fbf69ee6b24
R13: 00007ffd8dce7a50 R14: 0000555555d79810 R15: 00007ffd8dce7a90
BUG: scheduling while atomic: syz-executor.0/5533/0x00000002
INFO: lockdep is turned off.
Modules linked in:
Preemption disabled at:
[<0000000000000000>] 0x0