================================ WARNING: inconsistent lock state 6.9.0-rc5-syzkaller-01473-g2506f6229bd0 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. udevd/4537 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b94387e8 (lock#10){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b94387e8 (lock#10){+.?.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8f/0x630 mm/mmap_lock.c:237 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x630 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:166 [inline] get_mmap_lock_carefully mm/memory.c:5633 [inline] lock_mm_and_find_vma+0x213/0x2f0 mm/memory.c:5693 do_user_addr_fault arch/x86/mm/fault.c:1385 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x1a9/0x8e0 arch/x86/mm/fault.c:1563 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 strncpy_from_user+0x110/0x2f0 lib/strncpy_from_user.c:139 bpf_prog_load+0xd65/0x20f0 kernel/bpf/syscall.c:2849 __sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5677 __do_sys_bpf kernel/bpf/syscall.c:5784 [inline] __se_sys_bpf kernel/bpf/syscall.c:5782 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5782 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 657059 hardirqs last enabled at (657058): [] __do_softirq+0x1d3/0x980 kernel/softirq.c:538 hardirqs last disabled at (657059): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (657059): [] _raw_spin_lock_irq+0xad/0x120 kernel/locking/spinlock.c:170 softirqs last enabled at (656258): [] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last enabled at (656258): [] fpregs_lock arch/x86/include/asm/fpu/api.h:72 [inline] softirqs last enabled at (656258): [] fpu_clone+0x25b/0xad0 arch/x86/kernel/fpu/core.c:630 softirqs last disabled at (657057): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (657057): [] __irq_exit_rcu+0xf2/0x1c0 kernel/softirq.c:633 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 7 locks held by udevd/4537: #0: ffffffff8e210940 (console_lock){+.+.}-{0:0}, at: devkmsg_emit+0xda/0x120 kernel/printk/printk.c:722 #1: ffffffff8e210570 (console_srcu){....}-{0:0}, at: rcu_try_lock_acquire include/linux/rcupdate.h:334 [inline] #1: ffffffff8e210570 (console_srcu){....}-{0:0}, at: srcu_read_lock_nmisafe include/linux/srcu.h:232 [inline] #1: ffffffff8e210570 (console_srcu){....}-{0:0}, at: console_srcu_read_lock kernel/printk/printk.c:286 [inline] #1: ffffffff8e210570 (console_srcu){....}-{0:0}, at: console_flush_all+0x152/0xfd0 kernel/printk/printk.c:2971 #2: ffffc90000007c00 (&(&bat_priv->nc.work)->timer){..-.}-{0:0}, at: call_timer_fn+0xc0/0x650 kernel/time/timer.c:1790 #3: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #3: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #3: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: __queue_work+0x198/0xef0 kernel/workqueue.c:2324 #4: ffff8880150a0018 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x6ec/0xef0 #5: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #5: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #5: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2391 [inline] #5: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x24c/0x5a0 kernel/trace/bpf_trace.c:2434 #6: ffff88807cd49e20 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #6: ffff88807cd49e20 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 4537 Comm: udevd Not tainted 6.9.0-rc5-syzkaller-01473-g2506f6229bd0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 valid_state+0x13a/0x1c0 kernel/locking/lockdep.c:4013 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4216 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4678 __lock_acquire+0xbcd/0x1fd0 kernel/locking/lockdep.c:5091 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x630 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:166 [inline] stack_map_get_build_id_offset+0x9b2/0x9d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4ad/0x5a0 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1983 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1973 bpf_prog_e6cf5f9c69743609+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2392 [inline] bpf_trace_run3+0x33a/0x5a0 kernel/trace/bpf_trace.c:2434 trace_workqueue_queue_work include/trace/events/workqueue.h:23 [inline] __queue_work+0xe80/0xef0 kernel/workqueue.c:2382 call_timer_fn+0x18e/0x650 kernel/time/timer.c:1793 expire_timers kernel/time/timer.c:1839 [inline] __run_timers kernel/time/timer.c:2418 [inline] __run_timer_base+0x695/0x8e0 kernel/time/timer.c:2429 run_timer_base kernel/time/timer.c:2438 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2448 __do_softirq+0x2c6/0x980 kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf2/0x1c0 kernel/softirq.c:633 irq_exit_rcu+0x9/0x30 kernel/softirq.c:645 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:console_flush_all+0xaad/0xfd0 kernel/printk/printk.c:2985 Code: ff ff e8 26 97 1f 00 90 0f 0b 90 e9 d8 f8 ff ff e8 18 97 1f 00 e8 c3 88 0b 0a 4d 85 f6 74 b6 e8 09 97 1f 00 fb 48 8b 44 24 70 <42> 0f b6 04 38 84 c0 48 8b 7c 24 30 0f 85 22 02 00 00 0f b6 1f 31 RSP: 0018:ffffc9000326f500 EFLAGS: 00000293 RAX: 1ffff9200064deec RBX: 0000000000000000 RCX: ffff88807ca60000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000326f6b0 R08: ffffffff817684e4 R09: 1ffffffff25e82a0 R10: dffffc0000000000 R11: fffffbfff25e82a1 R12: ffffffff8eb165b8 R13: ffffffff8eb16560 R14: 0000000000000200 R15: dffffc0000000000 console_unlock+0x13b/0x4d0 kernel/printk/printk.c:3048 vprintk_emit+0x5a6/0x770 kernel/printk/printk.c:2348 devkmsg_emit+0xda/0x120 kernel/printk/printk.c:722 devkmsg_write+0x31e/0x3e0 kernel/printk/printk.c:785 do_iter_readv_writev+0x5a4/0x800 vfs_writev+0x395/0xbb0 fs/read_write.c:971 do_writev+0x1b1/0x350 fs/read_write.c:1018 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f924371ae03 Code: 89 c7 48 89 44 24 08 e8 6a f2 f9 ff 48 8b 44 24 08 48 83 c4 28 c3 c3 64 8b 04 25 18 00 00 00 85 c0 75 20 b8 14 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 6d 48 8b 15 f6 5f 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffdba4c81d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f924371ae03 RDX: 0000000000000005 RSI: 00007ffdba4c8240 RDI: 0000000000000005 RBP: 00007ffdba4c8240 R08: 00007ffdba4c82b7 R09: 00007ffdba4c7b58 R10: 0000000000000002 R11: 0000000000000246 R12: 000000000000001c R13: 00007ffdba4c8368 R14: 0000000000000000 R15: 00007ffdba4c82c8 ---------------- Code disassembly (best guess), 2 bytes skipped: 0: e8 26 97 1f 00 call 0x1f972b 5: 90 nop 6: 0f 0b ud2 8: 90 nop 9: e9 d8 f8 ff ff jmp 0xfffff8e6 e: e8 18 97 1f 00 call 0x1f972b 13: e8 c3 88 0b 0a call 0xa0b88db 18: 4d 85 f6 test %r14,%r14 1b: 74 b6 je 0xffffffd3 1d: e8 09 97 1f 00 call 0x1f972b 22: fb sti 23: 48 8b 44 24 70 mov 0x70(%rsp),%rax * 28: 42 0f b6 04 38 movzbl (%rax,%r15,1),%eax <-- trapping instruction 2d: 84 c0 test %al,%al 2f: 48 8b 7c 24 30 mov 0x30(%rsp),%rdi 34: 0f 85 22 02 00 00 jne 0x25c 3a: 0f b6 1f movzbl (%rdi),%ebx 3d: 31 .byte 0x31