================================ WARNING: inconsistent lock state 6.9.0-syzkaller-05151-g1b294a1f3561 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. sshd/5085 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9538828 (lock#9){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9538828 (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: 68479 hardirqs last enabled at (68478): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (68478): [] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202 hardirqs last disabled at (68479): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (68479): [] _raw_spin_lock_irq+0xad/0x120 kernel/locking/spinlock.c:170 softirqs last enabled at (68466): [] lock_sock include/net/sock.h:1595 [inline] softirqs last enabled at (68466): [] tcp_sendmsg+0x22/0x50 net/ipv4/tcp.c:1347 softirqs last disabled at (68469): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (68469): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (68469): [] __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 *** 6 locks held by sshd/5085: #0: ffff88807ab01ad8 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1595 [inline] #0: ffff88807ab01ad8 (sk_lock-AF_INET){+.+.}-{0:0}, at: tcp_sendmsg+0x22/0x50 net/ipv4/tcp.c:1347 #1: ffffc90000a18be0 (&(&ssp->srcu_sup->work)->timer){..-.}-{0:0}, at: call_timer_fn+0xc0/0x650 kernel/time/timer.c:1790 #2: ffffffff8e3361e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #2: ffffffff8e3361e0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #2: ffffffff8e3361e0 (rcu_read_lock){....}-{1:2}, at: __queue_work+0x198/0xef0 kernel/workqueue.c:2337 #3: ffff8880b953ddd8 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x6ec/0xef0 #4: ffffffff8e3361e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #4: ffffffff8e3361e0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #4: ffffffff8e3361e0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #4: ffffffff8e3361e0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x24c/0x5a0 kernel/trace/bpf_trace.c:2445 #5: ffff88807c035720 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #5: ffff88807c035720 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 5085 Comm: sshd Not tainted 6.9.0-syzkaller-05151-g1b294a1f3561 #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:2395 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 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+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:__orc_find arch/x86/kernel/unwind_orc.c:102 [inline] RIP: 0010:orc_find arch/x86/kernel/unwind_orc.c:227 [inline] RIP: 0010:unwind_next_frame+0x505/0x2a00 arch/x86/kernel/unwind_orc.c:494 Code: 01 c8 48 83 e0 fe 49 8d 5c 45 00 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df 0f b6 04 08 84 c0 75 34 48 63 2b 48 01 dd <48> 89 ef 4c 89 f6 e8 60 0a 55 00 48 8d 43 04 4c 39 f5 4c 0f 46 e8 RSP: 0018:ffffc900020ef180 EFLAGS: 00000293 RAX: 0000000000000000 RBX: ffffffff8fbcf9bc RCX: dffffc0000000000 RDX: ffff88806e53bc00 RSI: 000000000000d0b0 RDI: 000000000000d0b1 RBP: ffffffff814180e5 R08: ffffffff814152fe R09: 0000000000000000 R10: ffffc900020ef2c0 R11: fffff5200041de64 R12: ffffffff8fbcf9bc R13: ffffffff8fbcf9bc R14: ffffffff8141829b R15: ffffffff8fbcf9bc __unwind_start+0x641/0x7c0 arch/x86/kernel/unwind_orc.c:760 unwind_start arch/x86/include/asm/unwind.h:64 [inline] arch_stack_walk+0x103/0x1b0 arch/x86/kernel/stacktrace.c:24 stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:312 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3871 [inline] slab_alloc_node mm/slub.c:3918 [inline] kmem_cache_alloc_node+0x194/0x390 mm/slub.c:3961 __alloc_skb+0x1c3/0x440 net/core/skbuff.c:656 alloc_skb_fclone include/linux/skbuff.h:1358 [inline] tcp_stream_alloc_skb+0x3d/0x310 net/ipv4/tcp.c:879 tcp_sendmsg_locked+0xd5f/0x4d70 net/ipv4/tcp.c:1161 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1348 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:745 sock_write_iter+0x2dd/0x400 net/socket.c:1160 call_write_iter include/linux/fs.h:2120 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0xa2d/0xc50 fs/read_write.c:590 ksys_write+0x1a0/0x2c0 fs/read_write.c:643 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:0x7f821b916bf2 Code: 89 c7 48 89 44 24 08 e8 7b 34 fa 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 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 6f 48 8b 15 07 a2 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffcc05c6ca8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000064 RCX: 00007f821b916bf2 RDX: 0000000000000064 RSI: 000055dd231b2690 RDI: 0000000000000004 RBP: 000055dd231a8220 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000055dcee13eaa4 R13: 0000000000000039 R14: 000055dcee13f3e8 R15: 00007ffcc05c6d18 ---------------- Code disassembly (best guess): 0: 01 c8 add %ecx,%eax 2: 48 83 e0 fe and $0xfffffffffffffffe,%rax 6: 49 8d 5c 45 00 lea 0x0(%r13,%rax,2),%rbx b: 48 89 d8 mov %rbx,%rax e: 48 c1 e8 03 shr $0x3,%rax 12: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx 19: fc ff df 1c: 0f b6 04 08 movzbl (%rax,%rcx,1),%eax 20: 84 c0 test %al,%al 22: 75 34 jne 0x58 24: 48 63 2b movslq (%rbx),%rbp 27: 48 01 dd add %rbx,%rbp * 2a: 48 89 ef mov %rbp,%rdi <-- trapping instruction 2d: 4c 89 f6 mov %r14,%rsi 30: e8 60 0a 55 00 call 0x550a95 35: 48 8d 43 04 lea 0x4(%rbx),%rax 39: 4c 39 f5 cmp %r14,%rbp 3c: 4c 0f 46 e8 cmovbe %rax,%r13