device hsr_slave_0 entered promiscuous mode device hsr_slave_1 entered promiscuous mode ============================================ WARNING: possible recursive locking detected 5.15.159-syzkaller #0 Not tainted -------------------------------------------- syz-executor.4/4698 is trying to acquire lock: ffff888064d261c0 (&stab->lock){+...}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] ffff888064d261c0 (&stab->lock){+...}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 but task is already holding lock: ffff888064d261c0 (&stab->lock){+...}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] ffff888064d261c0 (&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 syz-executor.4/4698: #0: ffffffff8d9e7e48 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline] #0: ffffffff8d9e7e48 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x94c/0xee0 net/core/rtnetlink.c:5626 #1: ffffffff8c91fae0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #2: ffff888064d261c0 (&stab->lock){+...}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] #2: ffff888064d261c0 (&stab->lock){+...}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 #3: ffff888060ae4290 (&psock->link_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline] #3: ffff888060ae4290 (&psock->link_lock){+...}-{2:2}, at: sock_map_del_link net/core/sock_map.c:147 [inline] #3: ffff888060ae4290 (&psock->link_lock){+...}-{2:2}, at: sock_map_unref+0xcc/0x5d0 net/core/sock_map.c:182 #4: ffffffff8c91fae0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 stack backtrace: CPU: 0 PID: 4698 Comm: syz-executor.4 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/0xfc4 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/0xfc4 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] pskb_expand_head+0x360/0x1130 net/core/skbuff.c:1742 netlink_trim+0x183/0x220 net/netlink/af_netlink.c:1312 netlink_broadcast_filtered+0x62/0x11a0 net/netlink/af_netlink.c:1517 netlink_broadcast net/netlink/af_netlink.c:1562 [inline] nlmsg_multicast include/net/netlink.h:1033 [inline] nlmsg_notify+0xf7/0x1b0 net/netlink/af_netlink.c:2548 __dev_notify_flags+0xdd/0x610 net/core/dev.c:8847 __dev_set_promiscuity+0x194/0x5d0 net/core/dev.c:8623 dev_set_promiscuity+0x4d/0xd0 net/core/dev.c:8643 hsr_portdev_setup net/hsr/hsr_slave.c:134 [inline] hsr_add_port+0x343/0x650 net/hsr/hsr_slave.c:184 hsr_dev_finalize+0x4cf/0x6a0 net/hsr/hsr_device.c:545 hsr_newlink+0x6a6/0x760 net/hsr/hsr_netlink.c:102 __rtnl_newlink net/core/rtnetlink.c:3501 [inline] rtnl_newlink+0x14bd/0x2070 net/core/rtnetlink.c:3549 rtnetlink_rcv_msg+0x993/0xee0 net/core/rtnetlink.c:5629 netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2505 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x7b6/0x980 net/netlink/af_netlink.c:1356 netlink_sendmsg+0xa30/0xd60 net/netlink/af_netlink.c:1924 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x564/0x720 net/socket.c:2058 __do_sys_sendto net/socket.c:2070 [inline] __se_sys_sendto net/socket.c:2066 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2066 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:0x7f5c6a843bdc Code: 1a 51 02 00 44 8b 4c 24 2c 4c 8b 44 24 20 89 c5 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 34 89 ef 48 89 44 24 08 e8 60 51 02 00 48 8b RSP: 002b:00007ffdb9006120 EFLAGS: 00000293 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f5c6b499620 RCX: 00007f5c6a843bdc RDX: 0000000000000048 RSI: 00007f5c6b499670 RDI: 0000000000000003 RBP: 0000000000000000 R08: 00007ffdb9006174 R09: 000000000000000c R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000003 R13: 0000000000000000 R14: 00007f5c6b499670 R15: 0000000000000000