============================= [ BUG: Invalid wait context ] 6.12.0-syzkaller-11716-gd8b78066f4c9 #0 Not tainted ----------------------------- sshd/5918 is trying to lock: ffff88802a749a00 (&trie->lock){....}-{3:3}, at: trie_delete_elem+0xb0/0x820 kernel/bpf/lpm_trie.c:462 other info that might help us debug this: context-{5:5} 3 locks held by sshd/5918: #0: ffff8880285fb558 (sk_lock-AF_INET ){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1617 [inline] ){+.+.}-{0:0}, at: tcp_sendmsg+0x20/0x50 net/ipv4/tcp.c:1357 #1: ffff88806a82a898 (&base->lock){-.-.}-{2:2}, at: __mod_timer+0x6c1/0xdc0 kernel/time/timer.c:1163 #2: ffffffff8e1bbb40 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #2: ffffffff8e1bbb40 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #2: ffffffff8e1bbb40 (rcu_read_lock){....}-{1:3}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2350 [inline] #2: ffffffff8e1bbb40 (rcu_read_lock){....}-{1:3}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2392 stack backtrace: CPU: 2 UID: 0 PID: 5918 Comm: sshd Not tainted 6.12.0-syzkaller-11716-gd8b78066f4c9 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_lock_invalid_wait_context kernel/locking/lockdep.c:4826 [inline] check_wait_context kernel/locking/lockdep.c:4898 [inline] __lock_acquire+0x878/0x3c40 kernel/locking/lockdep.c:5176 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5849 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 trie_delete_elem+0xb0/0x820 kernel/bpf/lpm_trie.c:462 bpf_prog_2c29ac5cdc6b1842+0x43/0x47 bpf_dispatcher_nop_func include/linux/bpf.h:1290 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2351 [inline] bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2392 __bpf_trace_timer_start+0xc7/0x100 include/trace/events/timer.h:52 trace_timer_start include/trace/events/timer.h:52 [inline] enqueue_timer+0x2b0/0x550 kernel/time/timer.c:662 internal_add_timer kernel/time/timer.c:687 [inline] __mod_timer+0x8d7/0xdc0 kernel/time/timer.c:1182 sk_reset_timer+0x21/0xc0 net/core/sock.c:3519 tcp_rearm_rto+0xd2/0x100 net/ipv4/tcp_input.c:3288 tcp_event_new_data_sent+0x329/0x3f0 net/ipv4/tcp_output.c:83 tcp_write_xmit+0x12d4/0x8560 net/ipv4/tcp_output.c:2834 __tcp_push_pending_frames+0xaf/0x390 net/ipv4/tcp_output.c:3010 tcp_push+0x221/0x6f0 net/ipv4/tcp.c:751 tcp_sendmsg_locked+0x28d1/0x3770 net/ipv4/tcp.c:1326 tcp_sendmsg+0x2e/0x50 net/ipv4/tcp.c:1358 inet_sendmsg+0xb9/0x140 net/ipv4/af_inet.c:851 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg net/socket.c:726 [inline] sock_write_iter+0x4ac/0x5b0 net/socket.c:1147 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x207/0x250 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f3d01116bf2 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:00007ffd56b649b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000034 RCX: 00007f3d01116bf2 RDX: 0000000000000034 RSI: 000056507c30b970 RDI: 0000000000000004 RBP: 000056507c314290 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00005650468f1aa4 R13: 0000000000000023 R14: 00005650468f23e8 R15: 00007ffd56b64a28