================================ WARNING: inconsistent lock state 6.9.0-rc6-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. sshd/5064 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9538a80 (lock#9){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9538a80 (lock#9){+.?.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x7f/0x790 mm/mmap_lock.c:237 {SOFTIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x97/0x790 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.constprop.0+0x7d7/0xa10 mm/process_vm_access.c:216 process_vm_rw+0x301/0x360 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+0xe2/0x1c0 mm/process_vm_access.c:292 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 51059 hardirqs last enabled at (51058): [] __do_softirq+0x1d6/0x922 kernel/softirq.c:538 hardirqs last disabled at (51059): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (51059): [] _raw_spin_lock_irq+0x45/0x50 kernel/locking/spinlock.c:170 softirqs last enabled at (51052): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (51052): [] __do_softirq+0x5da/0x922 kernel/softirq.c:583 softirqs last disabled at (51057): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (51057): [] __irq_exit_rcu kernel/softirq.c:633 [inline] softirqs last disabled at (51057): [] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 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/5064: #0: ffff88801fdd9ad8 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1673 [inline] #0: ffff88801fdd9ad8 (sk_lock-AF_INET){+.+.}-{0:0}, at: tcp_sendmsg+0x20/0x50 net/ipv4/tcp.c:1341 #1: ffffc90000a08cb0 (&(&ssp->srcu_sup->work)->timer){..-.}-{0:0}, at: call_timer_fn+0x11a/0x610 kernel/time/timer.c:1790 #2: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #2: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #2: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: __queue_work+0xf2/0x1020 kernel/workqueue.c:2324 #3: ffff8880b953d998 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x38e/0x1020 kernel/workqueue.c:2357 #4: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #4: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #4: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #4: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0xf8/0x440 kernel/trace/bpf_trace.c:2421 #5: ffff88807d794420 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #5: ffff88807d794420 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x1e8/0x7d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 5064 Comm: sshd Not tainted 6.9.0-rc6-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+0x116/0x1f0 lib/dump_stack.c:114 print_usage_bug kernel/locking/lockdep.c:3971 [inline] valid_state kernel/locking/lockdep.c:4013 [inline] mark_lock_irq kernel/locking/lockdep.c:4216 [inline] mark_lock+0x923/0xc60 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4567 [inline] __lock_acquire+0x13d4/0x3b30 kernel/locking/lockdep.c:5091 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x97/0x790 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+0x5df/0x7d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x6bf/0x700 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1985 [inline] bpf_get_stack_raw_tp+0x124/0x160 kernel/trace/bpf_trace.c:1975 ___bpf_prog_run+0x3e51/0xabd0 kernel/bpf/core.c:1997 __bpf_prog_run32+0xc1/0x100 kernel/bpf/core.c:2236 bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline] __bpf_prog_run include/linux/filter.h:657 [inline] bpf_prog_run include/linux/filter.h:664 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline] bpf_trace_run3+0x167/0x440 kernel/trace/bpf_trace.c:2421 __bpf_trace_workqueue_queue_work+0x101/0x140 include/trace/events/workqueue.h:23 __traceiter_workqueue_queue_work+0x6c/0xc0 include/trace/events/workqueue.h:23 trace_workqueue_queue_work include/trace/events/workqueue.h:23 [inline] __queue_work+0x627/0x1020 kernel/workqueue.c:2382 call_timer_fn+0x1a0/0x610 kernel/time/timer.c:1793 expire_timers kernel/time/timer.c:1839 [inline] __run_timers+0x567/0xaf0 kernel/time/timer.c:2418 __run_timer_base kernel/time/timer.c:2429 [inline] __run_timer_base kernel/time/timer.c:2422 [inline] run_timer_base+0x111/0x190 kernel/time/timer.c:2438 run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2448 __do_softirq+0x218/0x922 kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:633 [inline] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:tcp_cwnd_validate net/ipv4/tcp_output.c:1947 [inline] RIP: 0010:tcp_write_xmit+0x35e4/0x7e50 net/ipv4/tcp_output.c:2815 Code: c1 ea 03 0f b6 14 02 4c 89 f0 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 3e 3f 00 00 66 89 6b 32 66 44 89 63 30 e9 0f da ff ff e7 49 43 f8 48 8b 04 24 48 8d b8 a0 01 00 00 48 b8 00 00 00 00 RSP: 0018:ffffc9000313f858 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 00000000536db6ee RCX: ffffffff894a4e78 RDX: ffff888029270000 RSI: 00000000536db6ee RDI: 0000000000000004 RBP: 00000000536db6ee R08: 0000000000000004 R09: 00000000536db6ee R10: 00000000536db6ee R11: 0000000000000001 R12: ffff88801fdda2a8 R13: 0000000000000000 R14: 0000000000000015 R15: ffffffff8fa0f580 __tcp_push_pending_frames+0xaf/0x390 net/ipv4/tcp_output.c:2977 tcp_push+0x221/0x6f0 net/ipv4/tcp.c:738 tcp_sendmsg_locked+0x2798/0x3470 net/ipv4/tcp.c:1310 tcp_sendmsg+0x2e/0x50 net/ipv4/tcp.c:1342 inet_sendmsg+0xb9/0x140 net/ipv4/af_inet.c:851 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] sock_write_iter+0x4b8/0x5c0 net/socket.c:1160 call_write_iter include/linux/fs.h:2110 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x6db/0x1100 fs/read_write.c:590 ksys_write+0x1f8/0x260 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe4e8516bf2 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:00007fff3f762ee8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000044 RCX: 00007fe4e8516bf2 RDX: 0000000000000044 RSI: 000056160e7551c0 RDI: 0000000000000004 RBP: 000056160e749240 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00005615e677aaa4 R13: 0000000000000050 R14: 00005615e677b3e8 R15: 00007fff3f762f58 ---------------- Code disassembly (best guess): 0: c1 ea 03 shr $0x3,%edx 3: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx 7: 4c 89 f0 mov %r14,%rax a: 83 e0 07 and $0x7,%eax d: 83 c0 01 add $0x1,%eax 10: 38 d0 cmp %dl,%al 12: 7c 08 jl 0x1c 14: 84 d2 test %dl,%dl 16: 0f 85 3e 3f 00 00 jne 0x3f5a 1c: 66 89 6b 32 mov %bp,0x32(%rbx) 20: 66 44 89 63 30 mov %r12w,0x30(%rbx) 25: e9 0f da ff ff jmp 0xffffda39 * 2a: e8 e7 49 43 f8 call 0xf8434a16 <-- trapping instruction 2f: 48 8b 04 24 mov (%rsp),%rax 33: 48 8d b8 a0 01 00 00 lea 0x1a0(%rax),%rdi 3a: 48 rex.W 3b: b8 00 00 00 00 mov $0x0,%eax