================================ WARNING: inconsistent lock state 6.9.0-syzkaller-g6f130e4d4a5f #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. strace-static-x/5088 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9438828 (lock#9){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438828 (lock#9){+.?.}-{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_lock include/linux/mmap_lock.h:147 [inline] process_vm_rw_single_vec mm/process_vm_access.c:105 [inline] process_vm_rw_core mm/process_vm_access.c:216 [inline] process_vm_rw+0xa46/0xcf0 mm/process_vm_access.c:284 __do_sys_process_vm_readv mm/process_vm_access.c:296 [inline] __se_sys_process_vm_readv mm/process_vm_access.c:292 [inline] __x64_sys_process_vm_readv+0xe0/0x100 mm/process_vm_access.c:292 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: 134029 hardirqs last enabled at (134028): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] hardirqs last enabled at (134028): [] _raw_spin_unlock_irqrestore+0x8f/0x140 kernel/locking/spinlock.c:194 hardirqs last disabled at (134029): [] queue_work_on+0x10a/0x380 kernel/workqueue.c:2406 softirqs last enabled at (133842): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last enabled at (133842): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (133842): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 softirqs last disabled at (133989): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (133989): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (133989): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#9); lock(lock#9); *** DEADLOCK *** 5 locks held by strace-static-x/5088: #0: ffffffff8e333de0 (rcu_callback){....}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #0: ffffffff8e333de0 (rcu_callback){....}-{0:0}, at: rcu_do_batch kernel/rcu/tree.c:2529 [inline] #0: ffffffff8e333de0 (rcu_callback){....}-{0:0}, at: rcu_core+0xa86/0x1830 kernel/rcu/tree.c:2809 #1: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: __queue_work+0x198/0xef0 kernel/workqueue.c:2283 #2: ffff8880b943ddd8 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x6ec/0xef0 #3: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #3: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #3: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #3: ffffffff8e333d20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x24c/0x5a0 kernel/trace/bpf_trace.c:2445 #4: ffff88807c536a20 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #4: ffff88807c536a20 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 5088 Comm: strace-static-x Not tainted 6.9.0-syzkaller-g6f130e4d4a5f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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:1994 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1984 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:2403 [inline] bpf_trace_run3+0x33a/0x5a0 kernel/trace/bpf_trace.c:2445 __traceiter_workqueue_queue_work+0x80/0xd0 include/trace/events/workqueue.h:23 trace_workqueue_queue_work include/trace/events/workqueue.h:23 [inline] __queue_work+0xe80/0xef0 kernel/workqueue.c:2341 queue_work_on+0x1c2/0x380 kernel/workqueue.c:2410 rcu_do_batch kernel/rcu/tree.c:2535 [inline] rcu_core+0xafd/0x1830 kernel/rcu/tree.c:2809 handle_softirqs+0x2d6/0x990 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x57/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0033:0x488a82 Code: 48 83 c4 08 48 89 ef 5b 5d ff e0 0f 1f 44 00 00 83 4d 00 10 b8 ff ff ff ff eb ac e8 58 e9 ff ff eb da 66 0f 1f 44 00 00 41 57 <41> 56 41 55 45 31 ed 41 54 55 53 48 83 ec 08 48 85 d2 74 5a 48 89 RSP: 002b:00007ffe2758b330 EFLAGS: 00000206 RAX: 00000000000008e8 RBX: 0000000000000001 RCX: 00000000ffffffff RDX: 0000000000000001 RSI: 0000000000553d33 RDI: 000000000063f460 RBP: 000000000063f460 R08: 000000000000420d R09: 00000000000003e4 R10: 0000000000664740 R11: 0000000000000206 R12: 0000000000553d33 R13: 0000000000641380 R14: 00000000206aace0 R15: 000000000063f160