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:1316 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5093, name: syz-executor.1 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 4 locks held by syz-executor.1/5093: #0: ffff88803491e0e0 (&type->s_umount_key#103){+.+.}-{3:3}, at: deactivate_super+0x96/0xd0 fs/super.c:362 #1: ffff888036a20b70 (&sdp->sd_quota_sync_mutex){+.+.}-{3:3}, at: gfs2_quota_sync+0x9b/0x8b0 fs/gfs2/quota.c:1302 #2: ffff888036a21058 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0xe7/0x26a0 fs/gfs2/log.c:1034 #3: ffff888036a20e80 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline] #3: ffff888036a20e80 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline] #3: ffff888036a20e80 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x4e/0x80 fs/gfs2/log.c:805 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 5093 Comm: syz-executor.1 Not tainted 6.2.0-rc4-syzkaller-00009-gd532dd102151 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 __might_resched+0x538/0x6a0 kernel/sched/core.c:10036 gfs2_glock_wait+0x52/0x2a0 fs/gfs2/glock.c:1316 gfs2_glock_nq_init fs/gfs2/glock.h:262 [inline] gfs2_freeze_lock+0x5f/0xc0 fs/gfs2/util.c:107 signal_our_withdraw fs/gfs2/util.c:160 [inline] gfs2_withdraw+0x5ab/0x14e0 fs/gfs2/util.c:351 gfs2_ail1_empty+0x8c9/0x950 fs/gfs2/log.c:368 gfs2_flush_revokes+0x59/0x80 fs/gfs2/log.c:806 revoke_lo_before_commit+0x2b/0xcf0 fs/gfs2/lops.c:869 lops_before_commit fs/gfs2/lops.h:40 [inline] gfs2_log_flush+0xc8e/0x26a0 fs/gfs2/log.c:1093 do_sync+0xa4c/0xc90 fs/gfs2/quota.c:975 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+0x134/0x160 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fcfa408d537 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:00007fff7c82c708 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fcfa408d537 RDX: 00007fff7c82c7db RSI: 000000000000000a RDI: 00007fff7c82c7d0 RBP: 00007fff7c82c7d0 R08: 00000000ffffffff R09: 00007fff7c82c5a0 R10: 00005555569a08b3 R11: 0000000000000246 R12: 00007fcfa40e6b24 R13: 00007fff7c82d890 R14: 00005555569a0810 R15: 00007fff7c82d8d0 ============================= [ BUG: Invalid wait context ] 6.2.0-rc4-syzkaller-00009-gd532dd102151 #0 Tainted: G W ----------------------------- syz-executor.1/5093 is trying to lock: ffff88801b1a8488 (&wq->mutex){+.+.}-{3:3}, at: __flush_workqueue+0x1b7/0x16a0 kernel/workqueue.c:2812 other info that might help us debug this: context-{4:4} 4 locks held by syz-executor.1/5093: #0: ffff88803491e0e0 (&type->s_umount_key#103){+.+.}-{3:3}, at: deactivate_super+0x96/0xd0 fs/super.c:362 #1: ffff888036a20b70 (&sdp->sd_quota_sync_mutex){+.+.}-{3:3}, at: gfs2_quota_sync+0x9b/0x8b0 fs/gfs2/quota.c:1302 #2: ffff888036a21058 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0xe7/0x26a0 fs/gfs2/log.c:1034 #3: ffff888036a20e80 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline] #3: ffff888036a20e80 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline] #3: ffff888036a20e80 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x4e/0x80 fs/gfs2/log.c:805 stack backtrace: CPU: 1 PID: 5093 Comm: syz-executor.1 Tainted: G W 6.2.0-rc4-syzkaller-00009-gd532dd102151 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 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+0x1a7/0x400 kernel/locking/lockdep.c:5668 __mutex_lock_common+0x1de/0x26c0 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799 __flush_workqueue+0x1b7/0x16a0 kernel/workqueue.c:2812 gfs2_make_fs_ro+0xd1/0x630 fs/gfs2/super.c:532 signal_our_withdraw fs/gfs2/util.c:166 [inline] gfs2_withdraw+0x5e8/0x14e0 fs/gfs2/util.c:351 gfs2_ail1_empty+0x8c9/0x950 fs/gfs2/log.c:368 gfs2_flush_revokes+0x59/0x80 fs/gfs2/log.c:806 revoke_lo_before_commit+0x2b/0xcf0 fs/gfs2/lops.c:869 lops_before_commit fs/gfs2/lops.h:40 [inline] gfs2_log_flush+0xc8e/0x26a0 fs/gfs2/log.c:1093 do_sync+0xa4c/0xc90 fs/gfs2/quota.c:975 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+0x134/0x160 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fcfa408d537 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:00007fff7c82c708 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fcfa408d537 RDX: 00007fff7c82c7db RSI: 000000000000000a RDI: 00007fff7c82c7d0 RBP: 00007fff7c82c7d0 R08: 00000000ffffffff R09: 00007fff7c82c5a0 R10: 00005555569a08b3 R11: 0000000000000246 R12: 00007fcfa40e6b24 R13: 00007fff7c82d890 R14: 00005555569a0810 R15: 00007fff7c82d8d0 BUG: scheduling while atomic: syz-executor.1/5093/0x00000002 INFO: lockdep is turned off. Modules linked in: Preemption disabled at: [<0000000000000000>] 0x0