BUG: sleeping function called from invalid context at include/linux/sched/mm.h:330 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 5517, name: udevd preempt_count: 0, expected: 0 RCU nest depth: 1, expected: 0 INFO: lockdep is turned off. CPU: 0 UID: 0 PID: 5517 Comm: udevd Not tainted 6.12.0-rc2-next-20241008-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/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:8638 might_alloc include/linux/sched/mm.h:330 [inline] slab_pre_alloc_hook mm/slub.c:4062 [inline] slab_alloc_node mm/slub.c:4140 [inline] kmem_cache_alloc_noprof+0x61/0x380 mm/slub.c:4167 getname_kernel+0x59/0x2f0 fs/namei.c:234 kern_path+0x1d/0x50 fs/namei.c:2716 is_same_device fs/btrfs/volumes.c:812 [inline] device_list_add+0xc64/0x1ea0 fs/btrfs/volumes.c:947 btrfs_scan_one_device+0xab5/0xd90 fs/btrfs/volumes.c:1538 btrfs_control_ioctl+0x165/0x3e0 fs/btrfs/super.c:2264 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893 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:0x7fc7e5f1ad49 Code: 5c c3 48 8d 44 24 08 48 89 54 24 e0 48 89 44 24 c0 48 8d 44 24 d0 48 89 44 24 c8 b8 10 00 00 00 c7 44 24 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 76 10 48 8b 15 ae 60 0d 00 f7 d8 41 83 c8 RSP: 002b:00007ffee148ca88 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc7e5f1ad49 RDX: 00007ffee148ca98 RSI: 0000000090009427 RDI: 0000000000000008 RBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffee148dad8 R14: 000055e4ab80ef50 R15: 00007ffee148e7f8