============================================ WARNING: possible recursive locking detected 6.9.0-rc5-syzkaller-00036-g9d1ddab261f3 #0 Not tainted -------------------------------------------- syz-executor.2/6694 is trying to acquire lock: ffff888025921468 (&htab->buckets[i].lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] ffff888025921468 (&htab->buckets[i].lock){+.-.}-{2:2}, at: sock_hash_delete_elem+0xeb/0x290 net/core/sock_map.c:945 but task is already holding lock: ffff888025921368 (&htab->buckets[i].lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] ffff888025921368 (&htab->buckets[i].lock){+.-.}-{2:2}, at: sock_hash_delete_elem+0xeb/0x290 net/core/sock_map.c:945 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&htab->buckets[i].lock); lock(&htab->buckets[i].lock); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by syz-executor.2/6694: #0: ffff88802b00cd88 (&xt[i].mutex){+.+.}-{3:3}, at: xt_find_table_lock+0x58/0x4f0 net/netfilter/x_tables.c:1243 #1: ffffffff8d9b4f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8d9b4f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8d9b4f20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #1: ffffffff8d9b4f20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0xe4/0x420 kernel/trace/bpf_trace.c:2420 #2: ffff888025921368 (&htab->buckets[i].lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #2: ffff888025921368 (&htab->buckets[i].lock){+.-.}-{2:2}, at: sock_hash_delete_elem+0xeb/0x290 net/core/sock_map.c:945 #3: ffffffff8d9b4f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #3: ffffffff8d9b4f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #3: ffffffff8d9b4f20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #3: ffffffff8d9b4f20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0xe4/0x420 kernel/trace/bpf_trace.c:2420 stack backtrace: CPU: 1 PID: 6694 Comm: syz-executor.2 Not tainted 6.9.0-rc5-syzkaller-00036-g9d1ddab261f3 #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 check_deadlock kernel/locking/lockdep.c:3062 [inline] validate_chain kernel/locking/lockdep.c:3856 [inline] __lock_acquire+0x20e6/0x3b30 kernel/locking/lockdep.c:5137 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x33/0x40 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:356 [inline] sock_hash_delete_elem+0xeb/0x290 net/core/sock_map.c:945 bpf_prog_bc4ba9860fbb0da4+0x46/0x4e 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_run2+0x154/0x420 kernel/trace/bpf_trace.c:2420 __bpf_trace_contention_end+0xca/0x110 include/trace/events/lock.h:122 __traceiter_contention_end+0x5d/0xa0 include/trace/events/lock.h:122 trace_contention_end.constprop.0+0xea/0x170 include/trace/events/lock.h:122 __pv_queued_spin_lock_slowpath+0x266/0xc80 kernel/locking/qspinlock.c:560 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline] queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline] queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x210/0x2c0 kernel/locking/spinlock_debug.c:116 spin_lock_bh include/linux/spinlock.h:356 [inline] sock_hash_delete_elem+0xeb/0x290 net/core/sock_map.c:945 bpf_prog_bc4ba9860fbb0da4+0x46/0x4e 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_run2+0x154/0x420 kernel/trace/bpf_trace.c:2420 __bpf_trace_contention_end+0xca/0x110 include/trace/events/lock.h:122 __traceiter_contention_end+0x5d/0xa0 include/trace/events/lock.h:122 trace_contention_end+0xce/0x140 include/trace/events/lock.h:122 __mutex_lock_common kernel/locking/mutex.c:617 [inline] __mutex_lock+0x19c/0x9c0 kernel/locking/mutex.c:752 xt_find_table_lock+0x58/0x4f0 net/netfilter/x_tables.c:1243 get_entries net/ipv6/netfilter/ip6_tables.c:1035 [inline] do_ip6t_get_ctl+0x48b/0xaf0 net/ipv6/netfilter/ip6_tables.c:1677 nf_getsockopt+0x7c/0xe0 net/netfilter/nf_sockopt.c:116 ipv6_getsockopt+0x1fd/0x2c0 net/ipv6/ipv6_sockglue.c:1494 tcp_getsockopt+0xa1/0x100 net/ipv4/tcp.c:4375 do_sock_getsockopt+0x2e8/0x760 net/socket.c:2373 __sys_getsockopt+0x1a1/0x270 net/socket.c:2402 __do_sys_getsockopt net/socket.c:2412 [inline] __se_sys_getsockopt net/socket.c:2409 [inline] __x64_sys_getsockopt+0xbd/0x160 net/socket.c:2409 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:0x7efe0547fa4a Code: c4 c1 e0 1a 0d 00 00 04 00 89 01 e9 e0 fe ff ff e8 3b 05 00 00 66 2e 0f 1f 84 00 00 00 00 00 90 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 06 c3 0f 1f 44 00 00 48 c7 c2 b0 ff ff ff f7 RSP: 002b:00007ffd507c2e58 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007ffd507c2ee0 RCX: 00007efe0547fa4a RDX: 0000000000000041 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 0000000000000003 R08: 00007ffd507c2e7c R09: 0079746972756365 R10: 00007ffd507c2ee0 R11: 0000000000000212 R12: 00007efe0557ab40 R13: 00007ffd507c2e7c R14: 0000000000000000 R15: 00007efe0557cd00 EXT4-fs (loop2): unmounting filesystem 00000000-0000-0000-0000-000000000000.