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:1281
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 4331, name: kworker/u4:8
4 locks held by kworker/u4:8/4331:
#0: ffff888018bb0938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x760/0x1000 kernel/workqueue.c:-1
#1: ffffc9000338fd00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7a3/0x1000 kernel/workqueue.c:2285
#2: ffff8880775590a8 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0xdb/0x2610 fs/gfs2/log.c:1035
#3: ffff888077558ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline]
#3: ffff888077558ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline]
#3: ffff888077558ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x4e/0x80 fs/gfs2/log.c:806
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 0 PID: 4331 Comm: kworker/u4:8 Not tainted 5.15.189-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Workqueue: writeback wb_workfn (flush-7:4)
Call Trace:
dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
___might_sleep+0x47c/0x600 kernel/sched/core.c:9639
gfs2_glock_wait+0x53/0x1c0 fs/gfs2/glock.c:1281
gfs2_glock_nq_init fs/gfs2/glock.h:246 [inline]
gfs2_freeze_lock+0x5a/0xc0 fs/gfs2/util.c:107
signal_our_withdraw fs/gfs2/util.c:160 [inline]
gfs2_withdraw+0x5bd/0x1460 fs/gfs2/util.c:343
gfs2_ail1_empty+0x7c2/0x850 fs/gfs2/log.c:369
gfs2_flush_revokes+0x58/0x80 fs/gfs2/log.c:807
revoke_lo_before_commit+0x28/0x5f0 fs/gfs2/lops.c:872
lops_before_commit fs/gfs2/lops.h:40 [inline]
gfs2_log_flush+0xbff/0x2610 fs/gfs2/log.c:1094
gfs2_write_inode+0x2a5/0x430 fs/gfs2/super.c:439
write_inode fs/fs-writeback.c:1495 [inline]
__writeback_single_inode+0x6c3/0xda0 fs/fs-writeback.c:1705
writeback_sb_inodes+0x9fe/0x1610 fs/fs-writeback.c:1930
wb_writeback+0x443/0xb90 fs/fs-writeback.c:2104
wb_do_writeback fs/fs-writeback.c:2247 [inline]
wb_workfn+0x423/0xe60 fs/fs-writeback.c:2288
process_one_work+0x863/0x1000 kernel/workqueue.c:2310
worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
=============================
[ BUG: Invalid wait context ]
5.15.189-syzkaller #0 Tainted: G W
-----------------------------
kworker/u4:8/4331 is trying to lock:
ffff888146305088 (&wq->mutex){+.+.}-{3:3}, at: flush_workqueue+0x165/0x1380 kernel/workqueue.c:2833
other info that might help us debug this:
context-{4:4}
4 locks held by kworker/u4:8/4331:
#0: ffff888018bb0938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x760/0x1000 kernel/workqueue.c:-1
#1: ffffc9000338fd00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7a3/0x1000 kernel/workqueue.c:2285
#2: ffff8880775590a8 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0xdb/0x2610 fs/gfs2/log.c:1035
#3: ffff888077558ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline]
#3: ffff888077558ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline]
#3: ffff888077558ed0 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x4e/0x80 fs/gfs2/log.c:806
stack backtrace:
CPU: 0 PID: 4331 Comm: kworker/u4:8 Tainted: G W 5.15.189-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Workqueue: writeback wb_workfn (flush-7:4)
Call Trace:
dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
print_lock_invalid_wait_context kernel/locking/lockdep.c:4664 [inline]
check_wait_context kernel/locking/lockdep.c:4725 [inline]
__lock_acquire+0x1be9/0x7c60 kernel/locking/lockdep.c:4962
lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1eb/0x2390 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
flush_workqueue+0x165/0x1380 kernel/workqueue.c:2833
gfs2_make_fs_ro+0xd1/0x5d0 fs/gfs2/super.c:529
signal_our_withdraw fs/gfs2/util.c:166 [inline]
gfs2_withdraw+0x5f9/0x1460 fs/gfs2/util.c:343
gfs2_ail1_empty+0x7c2/0x850 fs/gfs2/log.c:369
gfs2_flush_revokes+0x58/0x80 fs/gfs2/log.c:807
revoke_lo_before_commit+0x28/0x5f0 fs/gfs2/lops.c:872
lops_before_commit fs/gfs2/lops.h:40 [inline]
gfs2_log_flush+0xbff/0x2610 fs/gfs2/log.c:1094
gfs2_write_inode+0x2a5/0x430 fs/gfs2/super.c:439
write_inode fs/fs-writeback.c:1495 [inline]
__writeback_single_inode+0x6c3/0xda0 fs/fs-writeback.c:1705
writeback_sb_inodes+0x9fe/0x1610 fs/fs-writeback.c:1930
wb_writeback+0x443/0xb90 fs/fs-writeback.c:2104
wb_do_writeback fs/fs-writeback.c:2247 [inline]
wb_workfn+0x423/0xe60 fs/fs-writeback.c:2288
process_one_work+0x863/0x1000 kernel/workqueue.c:2310
worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
BUG: scheduling while atomic: kworker/u4:8/4331/0x00000002
INFO: lockdep is turned off.
Modules linked in:
Preemption disabled at:
[<0000000000000000>] 0x0