BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 2969, name: udevd preempt_count: 100, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. Preemption disabled at: [] softirq_handle_begin kernel/softirq.c:409 [inline] [] __do_softirq+0xe3/0xad8 kernel/softirq.c:547 CPU: 0 PID: 2969 Comm: udevd Not tainted 6.1.0-rc2-syzkaller-00105-gb229b6ca5abb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9890 __mutex_lock_common kernel/locking/mutex.c:580 [inline] __mutex_lock+0x9f/0x1350 kernel/locking/mutex.c:747 gsm_send.isra.0+0x41e/0x7e0 drivers/tty/n_gsm.c:724 gsm_command drivers/tty/n_gsm.c:788 [inline] gsm_dlci_begin_close+0x12e/0x210 drivers/tty/n_gsm.c:1930 gsm_dlci_t1+0x186/0x450 drivers/tty/n_gsm.c:1854 call_timer_fn+0x1da/0x7c0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers.part.0+0x6a2/0xaf0 kernel/time/timer.c:1790 __run_timers kernel/time/timer.c:1768 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803 __do_softirq+0x1f7/0xad8 kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1107 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:__slab_free+0x16/0x350 mm/slub.c:3463 Code: 7b 8b e8 0d 8b ff ff e9 ab fc ff ff 0f 1f 84 00 00 00 00 00 41 57 49 89 cf 41 56 49 89 fe 41 55 41 54 49 89 d4 55 48 89 f5 53 <48> 83 ec 60 48 8b 05 d7 8c 19 0c 48 29 c2 48 81 fa ff ff 1f 00 77 RSP: 0018:ffffc9000310fc38 EFLAGS: 00000287 RAX: ffff8880b9a3dd70 RBX: ffff888016609140 RCX: ffff888085f6c400 RDX: ffff888085f6c400 RSI: ffffea000217db00 RDI: ffff888011841c80 RBP: ffffea000217db00 R08: 0000000000000001 R09: ffffffff81c8f63c R10: 0000000000000000 R11: ffffea0001e81600 R12: ffff888085f6c400 R13: ffffc9000310fcb0 R14: ffff888011841c80 R15: ffff888085f6c400 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x62/0x80 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:737 [inline] slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x2ac/0x3c0 mm/slub.c:3422 getname_flags.part.0+0x50/0x4f0 fs/namei.c:139 getname_flags include/linux/audit.h:320 [inline] getname+0x8e/0xd0 fs/namei.c:218 do_sys_openat2+0xf5/0x4c0 fs/open.c:1304 do_sys_open fs/open.c:1326 [inline] __do_sys_openat fs/open.c:1342 [inline] __se_sys_openat fs/open.c:1337 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1337 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f4e9ef25697 Code: 25 00 00 41 00 3d 00 00 41 00 74 37 64 8b 04 25 18 00 00 00 85 c0 75 5b 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 85 00 00 00 48 83 c4 68 5d 41 5c c3 0f 1f RSP: 002b:00007ffe7be64d70 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00005634fb5044a0 RCX: 00007f4e9ef25697 RDX: 0000000000080241 RSI: 00007ffe7be651a8 RDI: 00000000ffffff9c RBP: 00007ffe7be651a8 R08: 0000000000000004 R09: 0000000000000001 R10: 00000000000001b6 R11: 0000000000000246 R12: 0000000000080241 R13: 00005634fb5044a0 R14: 0000000000000001 R15: 0000000000000000 BUG: scheduling while atomic: udevd/2969/0x00000101 INFO: lockdep is turned off. Modules linked in: Preemption disabled at: [] softirq_handle_begin kernel/softirq.c:409 [inline] [] __do_softirq+0xe3/0xad8 kernel/softirq.c:547 ---------------- Code disassembly (best guess): 0: 7b 8b jnp 0xffffff8d 2: e8 0d 8b ff ff callq 0xffff8b14 7: e9 ab fc ff ff jmpq 0xfffffcb7 c: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) 13: 00 14: 41 57 push %r15 16: 49 89 cf mov %rcx,%r15 19: 41 56 push %r14 1b: 49 89 fe mov %rdi,%r14 1e: 41 55 push %r13 20: 41 54 push %r12 22: 49 89 d4 mov %rdx,%r12 25: 55 push %rbp 26: 48 89 f5 mov %rsi,%rbp 29: 53 push %rbx * 2a: 48 83 ec 60 sub $0x60,%rsp <-- trapping instruction 2e: 48 8b 05 d7 8c 19 0c mov 0xc198cd7(%rip),%rax # 0xc198d0c 35: 48 29 c2 sub %rax,%rdx 38: 48 81 fa ff ff 1f 00 cmp $0x1fffff,%rdx 3f: 77 .byte 0x77