============================================ WARNING: possible recursive locking detected 5.15.157-syzkaller #0 Not tainted -------------------------------------------- ksoftirqd/0/14 is trying to acquire lock: ffff88801a82b9c0 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] ffff88801a82b9c0 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 but task is already holding lock: ffff88801a82b9c0 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] ffff88801a82b9c0 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&stab->lock); lock(&stab->lock); *** DEADLOCK *** May be due to missing lock nesting notation 5 locks held by ksoftirqd/0/14: #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: ffff88801a82b9c0 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] #2: ffff88801a82b9c0 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 #3: ffff888078fc8290 (&psock->link_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline] #3: ffff888078fc8290 (&psock->link_lock){+.-.}-{2:2}, at: sock_map_del_link net/core/sock_map.c:147 [inline] #3: ffff888078fc8290 (&psock->link_lock){+.-.}-{2:2}, at: sock_map_unref+0xcc/0x5d0 net/core/sock_map.c:182 #4: ffffffff8c91fb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 stack backtrace: CPU: 0 PID: 14 Comm: ksoftirqd/0 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 print_deadlock_bug kernel/locking/lockdep.c:2946 [inline] check_deadlock kernel/locking/lockdep.c:2989 [inline] validate_chain+0x46d2/0x5930 kernel/locking/lockdep.c:3775 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178 __sock_map_delete net/core/sock_map.c:419 [inline] sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 bpf_prog_2c29ac5cdc6b1842+0x3a/0x7ac 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_run2+0x19e/0x340 kernel/trace/bpf_trace.c:1917 __bpf_trace_kfree+0x6e/0x90 include/trace/events/kmem.h:118 trace_kfree include/trace/events/kmem.h:118 [inline] kfree+0x22f/0x270 mm/slub.c:4549 sk_psock_free_link include/linux/skmsg.h:422 [inline] sock_map_del_link net/core/sock_map.c:160 [inline] sock_map_unref+0x3ac/0x5d0 net/core/sock_map.c:182 __sock_map_delete net/core/sock_map.c:425 [inline] sock_map_delete_elem+0x191/0x230 net/core/sock_map.c:451 bpf_prog_2c29ac5cdc6b1842+0x3a/0x7ac 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_run2+0x19e/0x340 kernel/trace/bpf_trace.c:1917 __bpf_trace_kfree+0x6e/0x90 include/trace/events/kmem.h:118 trace_kfree include/trace/events/kmem.h:118 [inline] kfree+0x22f/0x270 mm/slub.c:4549 security_task_free+0x96/0xc0 security/security.c:1691 __put_task_struct+0xf4/0x2b0 kernel/fork.c:756 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:ksoftirqd_should_run+0x0/0x20 kernel/softirq.c:910 Code: e8 35 8c 48 c7 c7 80 45 7c 8c e8 0b e4 dc 02 43 80 3c 2c 00 0f 85 02 fc ff ff e9 05 fc ff ff e8 e6 2a d0 08 66 0f 1f 44 00 00 <48> c7 c7 40 10 8a 8a e8 b4 3f d0 08 65 66 8b 05 2c f6 b5 7e 0f b7 RSP: 0018:ffffc90000d37e68 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffffffff814da2c0 RCX: ffffffff8c7c4378 RDX: 0000000000000002 RSI: ffffffff8c7da790 RDI: 0000000000000000 RBP: ffff88813fe23540 R08: 0000000000000005 R09: ffffffff815663f1 R10: 0000000000000002 R11: ffff88813fe21dc0 R12: 1ffff110023bac98 R13: ffff888011dd64c0 R14: dffffc0000000000 R15: 1ffff110023bac98 smpboot_thread_fn+0x470/0x9d0 kernel/smpboot.c:158 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300 ---------------- Code disassembly (best guess): 0: e8 35 8c 48 c7 call 0xc7488c3a 5: c7 80 45 7c 8c e8 0b movl $0x2dce40b,-0x177383bb(%rax) c: e4 dc 02 f: 43 80 3c 2c 00 cmpb $0x0,(%r12,%r13,1) 14: 0f 85 02 fc ff ff jne 0xfffffc1c 1a: e9 05 fc ff ff jmp 0xfffffc24 1f: e8 e6 2a d0 08 call 0x8d02b0a 24: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) * 2a: 48 c7 c7 40 10 8a 8a mov $0xffffffff8a8a1040,%rdi <-- trapping instruction 31: e8 b4 3f d0 08 call 0x8d03fea 36: 65 66 8b 05 2c f6 b5 mov %gs:0x7eb5f62c(%rip),%ax # 0x7eb5f66a 3d: 7e 3e: 0f .byte 0xf 3f: b7 .byte 0xb7