============================================ WARNING: possible recursive locking detected 5.15.158-syzkaller #0 Not tainted -------------------------------------------- syz-fuzzer/4065 is trying to acquire lock: ffff0000cee88d88 (&hsr->seqnr_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline] ffff0000cee88d88 (&hsr->seqnr_lock){+.-.}-{2:2}, at: hsr_dev_xmit+0xf8/0x1d0 net/hsr/hsr_device.c:222 but task is already holding lock: ffff0000c9e0ad88 (&hsr->seqnr_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline] ffff0000c9e0ad88 (&hsr->seqnr_lock){+.-.}-{2:2}, at: send_hsr_supervision_frame+0x1fc/0x8a4 net/hsr/hsr_device.c:303 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&hsr->seqnr_lock); lock(&hsr->seqnr_lock); *** DEADLOCK *** May be due to missing lock nesting notation 9 locks held by syz-fuzzer/4065: #0: ffff0000c14f0d20 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1668 [inline] #0: ffff0000c14f0d20 (sk_lock-AF_INET){+.+.}-{0:0}, at: tcp_sendmsg+0x30/0x64 net/ipv4/tcp.c:1455 #1: ffff800014b114a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x18/0x54 include/linux/rcupdate.h:311 #2: ffff80001cbb6980 ((&hsr->announce_timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:45 [inline] #2: ffff80001cbb6980 ((&hsr->announce_timer)){+.-.}-{0:0}, at: call_timer_fn+0xd0/0x8f0 kernel/time/timer.c:1441 #3: ffff800014b114a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:311 #4: ffff0000c9e0ad88 (&hsr->seqnr_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline] #4: ffff0000c9e0ad88 (&hsr->seqnr_lock){+.-.}-{2:2}, at: send_hsr_supervision_frame+0x1fc/0x8a4 net/hsr/hsr_device.c:303 #5: ffff800014b114a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:311 #6: ffff800014b11500 (rcu_read_lock_bh){....}-{1:2}, at: rcu_lock_acquire+0x18/0x54 include/linux/rcupdate.h:311 #7: ffff800014b114a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:311 #8: ffff800014b11500 (rcu_read_lock_bh){....}-{1:2}, at: rcu_lock_acquire+0x18/0x54 include/linux/rcupdate.h:311 stack backtrace: CPU: 1 PID: 4065 Comm: syz-fuzzer Not tainted 5.15.158-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 __lock_acquire+0x62bc/0x7638 kernel/locking/lockdep.c:5012 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x124/0x1c4 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:368 [inline] hsr_dev_xmit+0xf8/0x1d0 net/hsr/hsr_device.c:222 __netdev_start_xmit include/linux/netdevice.h:5019 [inline] netdev_start_xmit include/linux/netdevice.h:5033 [inline] xmit_one net/core/dev.c:3617 [inline] dev_hard_start_xmit+0x2bc/0x92c net/core/dev.c:3633 __dev_queue_xmit+0x13a8/0x2a6c net/core/dev.c:4248 dev_queue_xmit+0x24/0x34 net/core/dev.c:4281 br_dev_queue_push_xmit+0x56c/0x70c net/bridge/br_forward.c:53 NF_HOOK+0x358/0x404 include/linux/netfilter.h:302 br_forward_finish+0x7c/0x90 net/bridge/br_forward.c:66 NF_HOOK+0x358/0x404 include/linux/netfilter.h:302 __br_forward+0x2f0/0x458 net/bridge/br_forward.c:115 deliver_clone net/bridge/br_forward.c:131 [inline] maybe_deliver+0xc8/0x188 net/bridge/br_forward.c:189 br_flood+0x28c/0x41c net/bridge/br_forward.c:231 br_dev_xmit+0xca8/0x1194 __netdev_start_xmit include/linux/netdevice.h:5019 [inline] netdev_start_xmit include/linux/netdevice.h:5033 [inline] xmit_one net/core/dev.c:3617 [inline] dev_hard_start_xmit+0x2bc/0x92c net/core/dev.c:3633 __dev_queue_xmit+0x13a8/0x2a6c net/core/dev.c:4248 dev_queue_xmit+0x24/0x34 net/core/dev.c:4281 hsr_xmit net/hsr/hsr_forward.c:338 [inline] hsr_forward_do net/hsr/hsr_forward.c:429 [inline] hsr_forward_skb+0xe78/0x15a8 net/hsr/hsr_forward.c:577 send_hsr_supervision_frame+0x414/0x8a4 net/hsr/hsr_device.c:326 hsr_announce+0x17c/0x31c net/hsr/hsr_device.c:382 call_timer_fn+0x19c/0x8f0 kernel/time/timer.c:1451 expire_timers kernel/time/timer.c:1496 [inline] __run_timers+0x554/0x718 kernel/time/timer.c:1767 run_timer_softirq+0x7c/0x114 kernel/time/timer.c:1780 __do_softirq+0x344/0xdb0 kernel/softirq.c:558 do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] do_softirq+0xf8/0x1ac kernel/softirq.c:459 __local_bh_enable_ip+0x298/0x470 kernel/softirq.c:383 local_bh_enable+0x28/0x1d0 include/linux/bottom_half.h:32 rcu_read_unlock_bh include/linux/rcupdate.h:809 [inline] ip_finish_output2+0xe78/0x131c net/ipv4/ip_output.c:229 __ip_finish_output+0x1b0/0x458 ip_finish_output+0x40/0x218 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip_output+0x330/0x49c net/ipv4/ip_output.c:430 dst_output include/net/dst.h:443 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] __ip_queue_xmit+0xe70/0x1930 net/ipv4/ip_output.c:532 ip_queue_xmit+0x5c/0x78 net/ipv4/ip_output.c:546 __tcp_transmit_skb+0x1944/0x31e8 net/ipv4/tcp_output.c:1402 tcp_transmit_skb net/ipv4/tcp_output.c:1420 [inline] tcp_write_xmit+0x12bc/0x4dc0 net/ipv4/tcp_output.c:2705 __tcp_push_pending_frames+0x98/0x228 net/ipv4/tcp_output.c:2890 tcp_push+0x420/0x650 net/ipv4/tcp.c:737 tcp_sendmsg_locked+0x2864/0x30a8 net/ipv4/tcp.c:1428 tcp_sendmsg+0x40/0x64 net/ipv4/tcp.c:1456 inet_sendmsg+0x15c/0x290 net/ipv4/af_inet.c:828 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] sock_write_iter+0x2b0/0x3f8 net/socket.c:1079 call_write_iter include/linux/fs.h:2172 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x87c/0xb3c fs/read_write.c:594 ksys_write+0x15c/0x26c fs/read_write.c:647 __do_sys_write fs/read_write.c:659 [inline] __se_sys_write fs/read_write.c:656 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:656 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584