============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.3.4526/23631 is trying to acquire lock:
ffff888029af1070 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:353 [inline]
ffff888029af1070 (&hsr->seqnr_lock){+.-.}-{3:3}, at: hsr_dev_xmit+0x237/0x360 net/hsr/hsr_device.c:235
but task is already holding lock:
ffff888029af1070 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:353 [inline]
ffff888029af1070 (&hsr->seqnr_lock){+.-.}-{3:3}, at: send_prp_supervision_frame+0x1fb/0x8b0 net/hsr/hsr_device.c:401
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
locks held by syz.3.4526/23631: 12, last CPU#0:
#0: ffff88807ebf03b8 (&mm->mmap_lock){++++}-{4:4}, at: mmap_write_lock include/linux/mmap_lock.h:536 [inline]
#0: ffff88807ebf03b8 (&mm->mmap_lock){++++}-{4:4}, at: exit_mmap+0x2d8/0x9f0 mm/mmap.c:1308
#1: ffffc90000007cc0 ((&hsr->announce_timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x5f0 kernel/time/timer.c:1745
#2: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#2: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:840 [inline]
#2: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: hsr_announce+0x89/0x370 net/hsr/hsr_device.c:446
#3: ffff888029af1070 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:353 [inline]
#3: ffff888029af1070 (&hsr->seqnr_lock){+.-.}-{3:3}, at: send_prp_supervision_frame+0x1fb/0x8b0 net/hsr/hsr_device.c:401
#4: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#4: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:840 [inline]
#4: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: hsr_forward_skb+0xb9/0x2b70 net/hsr/hsr_forward.c:772
#5: ffffffff8eb5a240 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#5: ffffffff8eb5a240 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:893 [inline]
#5: ffffffff8eb5a240 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820 net/core/dev.c:4844
#6: ffff88807965f228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#5){+...}-{3:3}, at: spin_trylock include/linux/spinlock.h:359 [inline]
#6: ffff88807965f228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#5){+...}-{3:3}, at: qdisc_run_begin include/net/sch_generic.h:206 [inline]
#6: ffff88807965f228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#5){+...}-{3:3}, at: __dev_xmit_skb net/core/dev.c:4249 [inline]
#6: ffff88807965f228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#5){+...}-{3:3}, at: __dev_queue_xmit+0x1143/0x3820 net/core/dev.c:4884
#7: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#7: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:840 [inline]
#7: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540 net/ipv6/ip6_output.c:236
#8: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#8: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:840 [inline]
#8: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: ndisc_send_skb+0x203/0x1650 net/ipv6/ndisc.c:483
#9: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#9: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:840 [inline]
#9: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540 net/ipv6/ip6_output.c:236
#10: ffffffff8eb5a240 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#10: ffffffff8eb5a240 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:893 [inline]
#10: ffffffff8eb5a240 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3820 net/core/dev.c:4844
#11: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#11: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:840 [inline]
#11: ffffffff8eb5a1e0 (rcu_read_lock){....}-{1:3}, at: hsr_dev_xmit+0x2d/0x360 net/hsr/hsr_device.c:229
stack backtrace:
CPU: 0 UID: 0 PID: 23631 Comm: syz.3.4526 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_deadlock_bug+0x279/0x290 kernel/locking/lockdep.c:3057
check_deadlock kernel/locking/lockdep.c:3109 [inline]
validate_chain kernel/locking/lockdep.c:3911 [inline]
__lock_acquire+0x24df/0x2cf0 kernel/locking/lockdep.c:5253
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5886
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:182 [inline]
_raw_spin_lock_bh+0x36/0x50 kernel/locking/spinlock.c:205
spin_lock_bh include/linux/spinlock.h:353 [inline]
hsr_dev_xmit+0x237/0x360 net/hsr/hsr_device.c:235
__netdev_start_xmit include/linux/netdevice.h:5429 [inline]
netdev_start_xmit include/linux/netdevice.h:5438 [inline]
xmit_one net/core/dev.c:3937 [inline]
dev_hard_start_xmit+0x2cd/0x830 net/core/dev.c:3953
__dev_queue_xmit+0x14c0/0x3820 net/core/dev.c:4926
NF_HOOK_COND include/linux/netfilter.h:314 [inline]
ip6_output+0x337/0x540 net/ipv6/ip6_output.c:248
dst_output include/net/dst.h:471 [inline]
NF_HOOK include/linux/netfilter.h:325 [inline]
ndisc_send_skb+0xcb2/0x1650 net/ipv6/ndisc.c:513
ndisc_send_ns net/ipv6/ndisc.c:672 [inline]
ndisc_solicit+0x374/0x670 net/ipv6/ndisc.c:763
neigh_probe net/core/neighbour.c:1093 [inline]
__neigh_event_send+0xf0c/0x1510 net/core/neighbour.c:1273
neigh_event_send_probe include/net/neighbour.h:480 [inline]
neigh_event_send include/net/neighbour.h:486 [inline]
neigh_resolve_output+0x1a1/0x720 net/core/neighbour.c:1600
NF_HOOK_COND include/linux/netfilter.h:314 [inline]
ip6_output+0x337/0x540 net/ipv6/ip6_output.c:248
ip6tunnel_xmit+0x200/0x620 include/net/ip6_tunnel.h:174
ip6_tnl_xmit+0x2034/0x27e0 net/ipv6/ip6_tunnel.c:1285
__gre6_xmit+0xa5c/0xd80 net/ipv6/ip6_gre.c:787
ip6gre_xmit_other net/ipv6/ip6_gre.c:873 [inline]
ip6gre_tunnel_xmit+0x9be/0xf50 net/ipv6/ip6_gre.c:900
__netdev_start_xmit include/linux/netdevice.h:5429 [inline]
netdev_start_xmit include/linux/netdevice.h:5438 [inline]
xmit_one net/core/dev.c:3937 [inline]
dev_hard_start_xmit+0x2cd/0x830 net/core/dev.c:3953
sch_direct_xmit+0x257/0x4c0 net/sched/sch_generic.c:372
__dev_xmit_skb net/core/dev.c:4262 [inline]
__dev_queue_xmit+0x177f/0x3820 net/core/dev.c:4884
dev_queue_xmit include/linux/netdevice.h:3461 [inline]
hsr_xmit net/hsr/hsr_forward.c:440 [inline]
hsr_forward_do net/hsr/hsr_forward.c:603 [inline]
hsr_forward_skb+0x1701/0x2b70 net/hsr/hsr_forward.c:777
send_prp_supervision_frame+0x49a/0x8b0 net/hsr/hsr_device.c:432
hsr_announce+0x1db/0x370 net/hsr/hsr_device.c:448
call_timer_fn+0x18d/0x5f0 kernel/time/timer.c:1748
expire_timers kernel/time/timer.c:1799 [inline]
__run_timers kernel/time/timer.c:2374 [inline]
__run_timer_base+0x652/0x8b0 kernel/time/timer.c:2386
run_timer_base kernel/time/timer.c:2395 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2405
handle_softirqs+0x226/0x860 kernel/softirq.c:645
__do_softirq kernel/softirq.c:679 [inline]
invoke_softirq kernel/softirq.c:519 [inline]
__irq_exit_rcu+0xcb/0x220 kernel/softirq.c:767
irq_exit_rcu+0x9/0x30 kernel/softirq.c:784
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:check_kcov_mode kernel/kcov.c:194 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x4f/0x80 kernel/kcov.c:217
Code: 01 00 0f 81 fe 00 01 00 00 40 0f 95 c6 81 fa 00 00 00 10 0f 93 c2 40 08 f2 75 35 83 b9 34 17 00 00 00 74 2c 8b 91 08 17 00 00 <83> fa 02 75 21 48 8b 91 10 17 00 00 48 8b 32 48 8d 7e 01 8b 89 0c
RSP: 0018:ffffc9000644f4c0 EFLAGS: 00000246
RAX: ffffffff822d4650 RBX: ffffea000181e300 RCX: ffff888052875dc0
RDX: 0000000000000000 RSI: 0000000000000013 RDI: ffffea000181e300
RBP: ffffc9000644f790 R08: ffffea000181e2c7 R09: 1ffffd4000303c58
R10: dffffc0000000000 R11: fffff94000303c59 R12: dffffc0000000000
R13: ffffea000181e300 R14: ffffea000181e300 R15: 1ffff1100b035989
free_swap_cache+0x20/0x300 mm/swap_state.c:547
free_pages_and_swap_cache+0x1bb/0x490 mm/swap_state.c:579
__tlb_batch_free_encoded_pages mm/mmu_gather.c:138 [inline]
tlb_batch_pages_flush mm/mmu_gather.c:151 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:417 [inline]
tlb_flush_mmu+0x6d3/0xa30 mm/mmu_gather.c:424
tlb_finish_mmu+0xf4/0x220 mm/mmu_gather.c:549
exit_mmap+0x4b2/0x9f0 mm/mmap.c:1313
__mmput+0x118/0x420 kernel/fork.c:1193
exit_mm+0x221/0x2d0 kernel/exit.c:615
do_exit+0x6cd/0x2360 kernel/exit.c:997
do_group_exit+0x22d/0x2f0 kernel/exit.c:1152
get_signal+0x121b/0x12c0 kernel/signal.c:3046
arch_do_signal_or_restart+0xbb/0x860 arch/x86/kernel/signal.c:337
__exit_to_user_mode_loop kernel/entry/common.c:66 [inline]
exit_to_user_mode_loop+0x10e/0x770 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:336 [inline]
do_syscall_64+0x328/0x520 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f202f99e159
Code: Unable to access opcode bytes at 0x7f202f99e12f.
RSP: 002b:00007f203092e0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f202fc25fa8 RCX: 00007f202f99e159
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f202fc25fa8
RBP: 00007f202fc25fa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f202fc26038 R14: 00007ffec7938a40 R15: 00007ffec7938b28
----------------
Code disassembly (best guess):
0: 01 00 add %eax,(%rax)
2: 0f 81 fe 00 01 00 jno 0x10106
8: 00 40 0f add %al,0xf(%rax)
b: 95 xchg %eax,%ebp
c: c6 81 fa 00 00 00 10 movb $0x10,0xfa(%rcx)
13: 0f 93 c2 setae %dl
16: 40 08 f2 or %sil,%dl
19: 75 35 jne 0x50
1b: 83 b9 34 17 00 00 00 cmpl $0x0,0x1734(%rcx)
22: 74 2c je 0x50
24: 8b 91 08 17 00 00 mov 0x1708(%rcx),%edx
* 2a: 83 fa 02 cmp $0x2,%edx <-- trapping instruction
2d: 75 21 jne 0x50
2f: 48 8b 91 10 17 00 00 mov 0x1710(%rcx),%rdx
36: 48 8b 32 mov (%rdx),%rsi
39: 48 8d 7e 01 lea 0x1(%rsi),%rdi
3d: 8b .byte 0x8b
3e: 89 .byte 0x89
3f: 0c .byte 0xc