================================ WARNING: inconsistent lock state 5.15.157-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. sshd/3496 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9a35bb8 (lock#8){+.?.}-{2:2}, at: local_lock_acquire+0xd/0x170 include/linux/local_lock_internal.h:28 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 local_lock_acquire+0x29/0x170 include/linux/local_lock_internal.h:29 __mmap_lock_do_trace_acquire_returned+0x7c/0x340 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:137 [inline] do_user_addr_fault arch/x86/mm/fault.c:1329 [inline] handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x59c/0x740 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:568 irq event stamp: 45255 hardirqs last enabled at (45254): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (45254): [] _raw_spin_unlock_irqrestore+0x8b/0x130 kernel/locking/spinlock.c:194 hardirqs last disabled at (45255): [] queue_work_on+0xf6/0x250 kernel/workqueue.c:1556 softirqs last enabled at (45208): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (45208): [] __irq_exit_rcu+0x155/0x240 kernel/softirq.c:637 softirqs last disabled at (45231): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (45231): [] __irq_exit_rcu+0x155/0x240 kernel/softirq.c:637 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#8); lock(lock#8); *** DEADLOCK *** 5 locks held by sshd/3496: #0: ffffffff8c91fbe0 (rcu_callback){....}-{0:0}, at: rcu_lock_acquire+0x0/0x20 #1: ffffffff8c91fb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #2: ffff8880b9a39b58 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x56d/0xd00 #3: ffffffff8c91fb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #4: ffff88807909f128 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #4: ffff88807909f128 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x23e/0x930 kernel/bpf/stackmap.c:185 stack backtrace: CPU: 0 PID: 3496 Comm: sshd Not tainted 5.15.157-syzkaller #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+0x1e3/0x2d0 lib/dump_stack.c:106 valid_state+0x134/0x1c0 kernel/locking/lockdep.c:3932 mark_lock_irq+0xa8/0xba0 kernel/locking/lockdep.c:4135 mark_lock+0x21a/0x340 kernel/locking/lockdep.c:4591 __lock_acquire+0xb9d/0x1ff0 kernel/locking/lockdep.c:4966 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 local_lock_acquire+0x29/0x170 include/linux/local_lock_internal.h:29 __mmap_lock_do_trace_acquire_returned+0x7c/0x340 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:137 [inline] stack_map_get_build_id_offset+0x612/0x930 kernel/bpf/stackmap.c:185 __bpf_get_stack+0x495/0x570 kernel/bpf/stackmap.c:496 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1490 [inline] bpf_get_stack_raw_tp+0x1b2/0x220 kernel/trace/bpf_trace.c:1480 bpf_prog_e6cf5f9c69743609+0x3a/0xb7c bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918 __traceiter_workqueue_queue_work+0x79/0xd0 include/trace/events/workqueue.h:23 trace_workqueue_queue_work include/trace/events/workqueue.h:23 [inline] __queue_work+0xc99/0xd00 kernel/workqueue.c:1512 queue_work_on+0x14b/0x250 kernel/workqueue.c:1559 rcu_do_batch kernel/rcu/tree.c:2523 [inline] rcu_core+0xa15/0x1650 kernel/rcu/tree.c:2763 __do_softirq+0x3b3/0x93a kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x155/0x240 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1096 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194 Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 12 e8 a2 f7 f6 44 24 21 02 75 4e 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 f7 14 30 f7 65 8b 05 c8 22 db 75 85 c0 74 3f 48 c7 04 24 0e 36 RSP: 0018:ffffc90002b37780 EFLAGS: 00000206 RAX: ef7f1dc0ef4f0100 RBX: 1ffff92000566ef4 RCX: ffffffff913eef03 RDX: dffffc0000000000 RSI: ffffffff8a8b2980 RDI: 0000000000000001 RBP: ffffc90002b37808 R08: ffffffff8186dd10 R09: ffffed1003c9e193 R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000 R13: 1ffff92000566ef0 R14: ffffc90002b377a0 R15: 0000000000000246 poll_wait include/linux/poll.h:47 [inline] pipe_poll+0xe3/0x4a0 fs/pipe.c:669 vfs_poll include/linux/poll.h:86 [inline] do_pollfd fs/select.c:872 [inline] do_poll fs/select.c:920 [inline] do_sys_poll+0x77a/0x11f0 fs/select.c:1014 __do_sys_ppoll fs/select.c:1120 [inline] __se_sys_ppoll+0x29c/0x330 fs/select.c:1100 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f5b87fc0ad5 Code: 85 d2 74 0d 0f 10 02 48 8d 54 24 20 0f 11 44 24 20 64 8b 04 25 18 00 00 00 85 c0 75 27 41 b8 08 00 00 00 b8 0f 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 75 48 8b 15 24 73 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffdd9f052b0 EFLAGS: 00000246 ORIG_RAX: 000000000000010f RAX: ffffffffffffffda RBX: 00000000000668a0 RCX: 00007f5b87fc0ad5 RDX: 00007ffdd9f052d0 RSI: 0000000000000004 RDI: 0000557bf3d037d0 RBP: 0000557bf3d023a0 R08: 0000000000000008 R09: 0000000000000000 R10: 00007ffdd9f053b8 R11: 0000000000000246 R12: 0000557bf2a61aa4 R13: 0000000000000001 R14: 0000557bf2a623e8 R15: 00007ffdd9f05338 ---------------- Code disassembly (best guess): 0: 9c pushf 1: 8f 44 24 20 pop 0x20(%rsp) 5: 42 80 3c 23 00 cmpb $0x0,(%rbx,%r12,1) a: 74 08 je 0x14 c: 4c 89 f7 mov %r14,%rdi f: e8 12 e8 a2 f7 call 0xf7a2e826 14: f6 44 24 21 02 testb $0x2,0x21(%rsp) 19: 75 4e jne 0x69 1b: 41 f7 c7 00 02 00 00 test $0x200,%r15d 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 f7 14 30 f7 call 0xf7301526 <-- trapping instruction 2f: 65 8b 05 c8 22 db 75 mov %gs:0x75db22c8(%rip),%eax # 0x75db22fe 36: 85 c0 test %eax,%eax 38: 74 3f je 0x79 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss