BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580
in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 5637, name: kworker/u4:9
preempt_count: 0, expected: 0
RCU nest depth: 1, expected: 0
3 locks held by kworker/u4:9/5637:
#0: ffff88803ba76138 ((wq_completion)xfs_iwalk-10489){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
#0: ffff88803ba76138 ((wq_completion)xfs_iwalk-10489){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
#0: ffff88803ba76138 ((wq_completion)xfs_iwalk-10489){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1280 [inline]
#0: ffff88803ba76138 ((wq_completion)xfs_iwalk-10489){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:643 [inline]
#0: ffff88803ba76138 ((wq_completion)xfs_iwalk-10489){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:670 [inline]
#0: ffff88803ba76138 ((wq_completion)xfs_iwalk-10489){+.+.}-{0:0}, at: process_one_work+0x883/0x15e0 kernel/workqueue.c:2376
#1: ffffc90005fe7db0 ((work_completion)(&pwork->work)){+.+.}-{0:0}, at: process_one_work+0x8b7/0x15e0 kernel/workqueue.c:2380
#2: ffffffff8c796680 (rcu_read_lock){....}-{1:2}, at: vb_alloc mm/vmalloc.c:2090 [inline]
#2: ffffffff8c796680 (rcu_read_lock){....}-{1:2}, at: vm_map_ram+0x7a/0xcf0 mm/vmalloc.c:2290
CPU: 0 PID: 5637 Comm: kworker/u4:9 Not tainted 6.3.0-rc3-next-20230322-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: xfs_iwalk-10489 xfs_pwork_work
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x136/0x150 lib/dump_stack.c:106
__might_resched+0x358/0x580 kernel/sched/core.c:10059
__mutex_lock_common kernel/locking/mutex.c:580 [inline]
__mutex_lock+0x9f/0x1350 kernel/locking/mutex.c:747
vb_alloc mm/vmalloc.c:2105 [inline]
vm_map_ram+0x13d/0xcf0 mm/vmalloc.c:2290
_xfs_buf_map_pages+0x158/0x3a0 fs/xfs/xfs_buf.c:441
xfs_buf_get_map+0x1cb8/0x2fd0 fs/xfs/xfs_buf.c:719
xfs_buf_read_map+0xce/0xb10 fs/xfs/xfs_buf.c:811
xfs_buf_readahead_map+0x8c/0xc0 fs/xfs/xfs_buf.c:889
xfs_buf_readahead fs/xfs/xfs_buf.h:262 [inline]
xfs_btree_reada_bufs+0x170/0x1e0 fs/xfs/libxfs/xfs_btree.c:926
xfs_iwalk_ichunk_ra+0x2a1/0x3e0 fs/xfs/xfs_iwalk.c:114
xfs_iwalk_ag+0x607/0x930 fs/xfs/xfs_iwalk.c:455
xfs_iwalk_ag_work+0x14a/0x1c0 fs/xfs/xfs_iwalk.c:624
xfs_pwork_work+0x7f/0x160 fs/xfs/xfs_pwork.c:47
process_one_work+0x99a/0x15e0 kernel/workqueue.c:2405
worker_thread+0x67d/0x10c0 kernel/workqueue.c:2552
kthread+0x33e/0x440 kernel/kthread.c:379
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
=============================
[ BUG: Invalid wait context ]
6.3.0-rc3-next-20230322-syzkaller #0 Tainted: G W
-----------------------------
kworker/u4:9/5637 is trying to lock:
ffff888077ba5068 (&vb->lock){+.+.}-{3:3}, at: vb_alloc mm/vmalloc.c:2105 [inline]
ffff888077ba5068 (&vb->lock){+.+.}-{3:3}, at: vm_map_ram+0x13d/0xcf0 mm/vmalloc.c:2290
other info that might help us debug this:
context-{4:4}
3 locks held by kworker/u4:9/5637:
#0: ffff88803ba76138 ((wq_completion)xfs_iwalk-10489){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
#0: ffff88803ba76138 ((wq_completion)xfs_iwalk-10489){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
#0: ffff88803ba76138 ((wq_completion)xfs_iwalk-10489){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1280 [inline]
#0: ffff88803ba76138 ((wq_completion)xfs_iwalk-10489){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:643 [inline]
#0: ffff88803ba76138 ((wq_completion)xfs_iwalk-10489){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:670 [inline]
#0: ffff88803ba76138 ((wq_completion)xfs_iwalk-10489){+.+.}-{0:0}, at: process_one_work+0x883/0x15e0 kernel/workqueue.c:2376
#1: ffffc90005fe7db0 ((work_completion)(&pwork->work)){+.+.}-{0:0}, at: process_one_work+0x8b7/0x15e0 kernel/workqueue.c:2380
#2: ffffffff8c796680 (rcu_read_lock){....}-{1:2}, at: vb_alloc mm/vmalloc.c:2090 [inline]
#2: ffffffff8c796680 (rcu_read_lock){....}-{1:2}, at: vm_map_ram+0x7a/0xcf0 mm/vmalloc.c:2290
stack backtrace:
CPU: 1 PID: 5637 Comm: kworker/u4:9 Tainted: G W 6.3.0-rc3-next-20230322-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: xfs_iwalk-10489 xfs_pwork_work
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106
print_lock_invalid_wait_context kernel/locking/lockdep.c:4724 [inline]
check_wait_context kernel/locking/lockdep.c:4785 [inline]
__lock_acquire+0x159e/0x5df0 kernel/locking/lockdep.c:5024
lock_acquire.part.0+0x11c/0x370 kernel/locking/lockdep.c:5691
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x12f/0x1350 kernel/locking/mutex.c:747
vb_alloc mm/vmalloc.c:2105 [inline]
vm_map_ram+0x13d/0xcf0 mm/vmalloc.c:2290
_xfs_buf_map_pages+0x158/0x3a0 fs/xfs/xfs_buf.c:441
xfs_buf_get_map+0x1cb8/0x2fd0 fs/xfs/xfs_buf.c:719
xfs_buf_read_map+0xce/0xb10 fs/xfs/xfs_buf.c:811
xfs_buf_readahead_map+0x8c/0xc0 fs/xfs/xfs_buf.c:889
xfs_buf_readahead fs/xfs/xfs_buf.h:262 [inline]
xfs_btree_reada_bufs+0x170/0x1e0 fs/xfs/libxfs/xfs_btree.c:926
xfs_iwalk_ichunk_ra+0x2a1/0x3e0 fs/xfs/xfs_iwalk.c:114
xfs_iwalk_ag+0x607/0x930 fs/xfs/xfs_iwalk.c:455
xfs_iwalk_ag_work+0x14a/0x1c0 fs/xfs/xfs_iwalk.c:624
xfs_pwork_work+0x7f/0x160 fs/xfs/xfs_pwork.c:47
process_one_work+0x99a/0x15e0 kernel/workqueue.c:2405
worker_thread+0x67d/0x10c0 kernel/workqueue.c:2552
kthread+0x33e/0x440 kernel/kthread.c:379
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308