sb: ffff88802058c000, wb_writeback BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1578 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 2837, name: kworker/u8:7 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by kworker/u8:7/2837: #0: ffff8880186ea948 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff8880186ea948 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc90009a67d00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc90009a67d00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffff888020b920d8 (&wb->list_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #2: ffff888020b920d8 (&wb->list_lock){+.+.}-{2:2}, at: wb_writeback+0x29e/0xdb0 fs/fs-writeback.c:2106 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 2837 Comm: kworker/u8:7 Not tainted 6.10.0-rc4-syzkaller-00148-g50736169ecc8-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 __might_resched+0x5d4/0x780 kernel/sched/core.c:10196 down_write+0x19/0x50 kernel/locking/rwsem.c:1578 wb_writeback+0x836/0xdb0 fs/fs-writeback.c:2128 wb_do_writeback fs/fs-writeback.c:2278 [inline] wb_workfn+0x410/0x1090 fs/fs-writeback.c:2318 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd70 kernel/workqueue.c:3393 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 ============================= [ BUG: Invalid wait context ] 6.10.0-rc4-syzkaller-00148-g50736169ecc8-dirty #0 Tainted: G W ----------------------------- kworker/u8:7/2837 is trying to lock: ffff88802058c0e0 (&type->s_umount_key#52){+.+.}-{3:3}, at: wb_writeback+0x836/0xdb0 fs/fs-writeback.c:2128 other info that might help us debug this: context-{4:4} 3 locks held by kworker/u8:7/2837: #0: ffff8880186ea948 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff8880186ea948 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc90009a67d00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc90009a67d00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffff888020b920d8 (&wb->list_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #2: ffff888020b920d8 (&wb->list_lock){+.+.}-{2:2}, at: wb_writeback+0x29e/0xdb0 fs/fs-writeback.c:2106 stack backtrace: CPU: 1 PID: 2837 Comm: kworker/u8:7 Tainted: G W 6.10.0-rc4-syzkaller-00148-g50736169ecc8-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_lock_invalid_wait_context kernel/locking/lockdep.c:4751 [inline] check_wait_context kernel/locking/lockdep.c:4821 [inline] __lock_acquire+0x1507/0x1fd0 kernel/locking/lockdep.c:5087 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 down_write+0x3a/0x50 kernel/locking/rwsem.c:1579 wb_writeback+0x836/0xdb0 fs/fs-writeback.c:2128 wb_do_writeback fs/fs-writeback.c:2278 [inline] wb_workfn+0x410/0x1090 fs/fs-writeback.c:2318 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd70 kernel/workqueue.c:3393 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 BUG: scheduling while atomic: kworker/u8:7/2837/0x00000002 INFO: lockdep is turned off. Modules linked in: Preemption disabled at: [<0000000000000000>] 0x0