BUG: sleeping function called from invalid context at include/linux/sched/mm.h:337 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5520, name: udevd preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 4 locks held by udevd/5520: #0: ffff88802a738420 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:409 #1: ffff88802301caa0 (&type->i_mutex_dir_key#5/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:834 [inline] #1: ffff88802301caa0 (&type->i_mutex_dir_key#5/1){+.+.}-{3:3}, at: do_unlinkat+0x26a/0x830 fs/namei.c:4411 #2: ffff88801ee5de38 (&sb->s_type->i_mutex_key#12){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:799 [inline] #2: ffff88801ee5de38 (&sb->s_type->i_mutex_key#12){+.+.}-{3:3}, at: vfs_unlink+0xe4/0x650 fs/namei.c:4349 #3: ffff88802301c850 (&simple_offset_lock_class){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #3: ffff88802301c850 (&simple_offset_lock_class){+.+.}-{2:2}, at: mtree_erase+0x1dd/0x3e0 lib/maple_tree.c:6650 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 UID: 0 PID: 5520 Comm: udevd Tainted: G W 6.10.0-rc5-next-20240625-syzkaller-08232-g0fc4bfab2cd4 #0 Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 __might_resched+0x5d4/0x780 kernel/sched/core.c:8520 might_alloc include/linux/sched/mm.h:337 [inline] slab_pre_alloc_hook mm/slub.c:3926 [inline] slab_alloc_node mm/slub.c:4017 [inline] kmem_cache_alloc_noprof+0x5d/0x2a0 mm/slub.c:4044 mt_alloc_one lib/maple_tree.c:162 [inline] mas_alloc_nodes+0x26c/0x840 lib/maple_tree.c:1242 mas_node_count_gfp lib/maple_tree.c:1322 [inline] mas_wr_preallocate+0x4ca/0x6b0 lib/maple_tree.c:4351 mas_store_gfp+0x172/0x4d0 lib/maple_tree.c:5562 mas_erase lib/maple_tree.c:6329 [inline] mtree_erase+0x2b2/0x3e0 lib/maple_tree.c:6651 simple_offset_remove+0x58/0x90 fs/libfs.c:324 shmem_unlink+0x172/0x2a0 mm/shmem.c:3548 vfs_unlink+0x365/0x650 fs/namei.c:4360 do_unlinkat+0x4ae/0x830 fs/namei.c:4424 __do_sys_unlink fs/namei.c:4472 [inline] __se_sys_unlink fs/namei.c:4470 [inline] __x64_sys_unlink+0x47/0x50 fs/namei.c:4470 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7da6117da7 Code: f0 ff ff 73 01 c3 48 8b 0d 7e 90 0d 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 57 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 51 90 0d 00 f7 d8 64 89 01 48 RSP: 002b:00007ffe20b09688 EFLAGS: 00000206 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000564842873120 RCX: 00007f7da6117da7 RDX: 00007ffe20b096aa RSI: 00005648428574cd RDI: 00007ffe20b09698 RBP: 000056484f2ca500 R08: 0000000000000000 R09: 00007ffe20b09008 R10: 0000000000000010 R11: 0000000000000206 R12: 0000000000000011 R13: 00007ffe20b09698 R14: 0000000003938700 R15: 0000564842873160