============================================
WARNING: possible recursive locking detected
5.15.159-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.1/3636 is trying to acquire lock:
ffff88801a5bb1c0 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline]
ffff88801a5bb1c0 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451
but task is already holding lock:
ffff88801a5bb1c0 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline]
ffff88801a5bb1c0 (&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
6 locks held by syz-executor.1/3636:
#0: ffff888024790460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377
#1: ffff8881407b8898 (_xmit_ETHER#2){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline]
#1: ffff8881407b8898 (_xmit_ETHER#2){+.-.}-{2:2}, at: __netif_tx_lock include/linux/netdevice.h:4429 [inline]
#1: ffff8881407b8898 (_xmit_ETHER#2){+.-.}-{2:2}, at: virtnet_poll_tx+0x16f/0x4f0 drivers/net/virtio_net.c:1684
#2: ffffffff8c91fae0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311
#3: ffff88801a5bb1c0 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline]
#3: ffff88801a5bb1c0 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451
#4: ffff888074514290 (&psock->link_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline]
#4: ffff888074514290 (&psock->link_lock){+.-.}-{2:2}, at: sock_map_del_link net/core/sock_map.c:147 [inline]
#4: ffff888074514290 (&psock->link_lock){+.-.}-{2:2}, at: sock_map_unref+0xcc/0x5d0 net/core/sock_map.c:182
#5: ffffffff8c91fae0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311
stack backtrace:
CPU: 0 PID: 3636 Comm: syz-executor.1 Not tainted 5.15.159-syzkaller #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+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_8a405b5ced52e191+0x42/0x488
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:421 [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_8a405b5ced52e191+0x42/0x488
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
skb_free_head net/core/skbuff.c:655 [inline]
skb_release_data+0x73a/0x8a0 net/core/skbuff.c:677
skb_release_all net/core/skbuff.c:742 [inline]
napi_consume_skb+0x1b3/0x270 net/core/skbuff.c:992
free_old_xmit_skbs+0x122/0x2c0 drivers/net/virtio_net.c:1519
virtnet_poll_tx+0x1c8/0x4f0 drivers/net/virtio_net.c:1686
__napi_poll+0xc7/0x440 net/core/dev.c:7035
napi_poll net/core/dev.c:7102 [inline]
net_rx_action+0x617/0xda0 net/core/dev.c:7192
__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
common_interrupt+0xa4/0xc0 arch/x86/kernel/irq.c:240
asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:629
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:202
Code: 51 80 f6 ff 90 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 5e 54 3b f7 48 89 df e8 36 a8 3c f7 e8 51 5f 5f f7 fb bf 01 00 00 00 76 e4 2f f7 65 8b 05 47 f2 da 75 85 c0 74 02 5b c3 e8 b4 10 d9
RSP: 0018:ffffc9000119f8b0 EFLAGS: 00000282
RAX: a440b08bb1581c00 RBX: ffff88806fb3c0a0 RCX: ffffffff81631938
RDX: dffffc0000000000 RSI: ffffffff8a8b2980 RDI: 0000000000000001
RBP: ffffc9000119f9f0 R08: dffffc0000000000 R09: fffffbfff1f7f02d
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88806fb3c098
R13: dffffc0000000000 R14: 000000000000000f R15: ffffc9000119fa80
spin_unlock_irq include/linux/spinlock.h:413 [inline]
delete_from_page_cache_batch+0x97f/0xb70 mm/filemap.c:350
truncate_inode_pages_range+0x371/0x1290 mm/truncate.c:326
ext4_evict_inode+0x2ae/0x1100 fs/ext4/inode.c:224
evict+0x2a4/0x620 fs/inode.c:587
do_unlinkat+0x508/0x950 fs/namei.c:4355
__do_sys_unlink fs/namei.c:4396 [inline]
__se_sys_unlink fs/namei.c:4394 [inline]
__x64_sys_unlink+0x45/0x50 fs/namei.c:4394
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f2fe813e697
Code: 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 57 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd73a79ab8 EFLAGS: 00000206 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2fe813e697
RDX: 00007ffd73a79ae0 RSI: 00007ffd73a79b70 RDI: 00007ffd73a79b70
RBP: 00007ffd73a79b70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000100 R11: 0000000000000206 R12: 00007ffd73a7ac30
R13: 00007f2fe818a336 R14: 0000000000011822 R15: 0000000000000011
----------------
Code disassembly (best guess):
0: 51 push %rcx
1: 80 f6 ff xor $0xff,%dh
4: 90 nop
5: 53 push %rbx
6: 48 89 fb mov %rdi,%rbx
9: 48 83 c7 18 add $0x18,%rdi
d: 48 8b 74 24 08 mov 0x8(%rsp),%rsi
12: e8 5e 54 3b f7 call 0xf73b5475
17: 48 89 df mov %rbx,%rdi
1a: e8 36 a8 3c f7 call 0xf73ca855
1f: e8 51 5f 5f f7 call 0xf75f5f75
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 76 e4 2f f7 call 0xf72fe4a5 <-- trapping instruction
2f: 65 8b 05 47 f2 da 75 mov %gs:0x75daf247(%rip),%eax # 0x75daf27d
36: 85 c0 test %eax,%eax
38: 74 02 je 0x3c
3a: 5b pop %rbx
3b: c3 ret
3c: e8 .byte 0xe8
3d: b4 10 mov $0x10,%ah
3f: d9 .byte 0xd9