============================================
WARNING: possible recursive locking detected
6.16.0-rc5-syzkaller-01399-ga52f9f0d77f2 #0 Not tainted
--------------------------------------------
syz.1.728/8519 is trying to acquire lock:
ffff8880314b6f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
ffff8880314b6f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: hsr_dev_xmit+0x19a/0x220 net/hsr/hsr_device.c:234
but task is already holding lock:
ffff88807b3c6f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
ffff88807b3c6f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: hsr_dev_xmit+0x19a/0x220 net/hsr/hsr_device.c:234
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
10 locks held by syz.1.728/8519:
#0: ffffffff8e25f270 (remove_cache_srcu){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:161 [inline]
#0: ffffffff8e25f270 (remove_cache_srcu){.+.+}-{0:0}, at: srcu_read_lock+0x27/0x60 include/linux/srcu.h:253
#1: ffffc90000a08be0 ((&ndev->rs_timer)){+.-.}-{0:0}, at: call_timer_fn+0xbe/0x5f0 kernel/time/timer.c:1744
#2: ffffffff8e13f160 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
#2: ffffffff8e13f160 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline]
#2: ffffffff8e13f160 (rcu_read_lock){....}-{1:3}, at: ndisc_send_skb+0x20c/0x1440 net/ipv6/ndisc.c:482
#3: ffffffff8e13f160 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
#3: ffffffff8e13f160 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline]
#3: ffffffff8e13f160 (rcu_read_lock){....}-{1:3}, at: ip6_finish_output2+0x701/0x16a0 net/ipv6/ip6_output.c:126
#4: ffffffff8e13f1c0 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#4: ffffffff8e13f1c0 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:892 [inline]
#4: ffffffff8e13f1c0 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x27b/0x3b50 net/core/dev.c:4637
#5: ffff88807b3c6f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
#5: ffff88807b3c6f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: hsr_dev_xmit+0x19a/0x220 net/hsr/hsr_device.c:234
#6: ffffffff8e13f160 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
#6: ffffffff8e13f160 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline]
#6: ffffffff8e13f160 (rcu_read_lock){....}-{1:3}, at: hsr_forward_skb+0x9e/0x2860 net/hsr/hsr_forward.c:728
#7: ffffffff8e13f1c0 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#7: ffffffff8e13f1c0 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:892 [inline]
#7: ffffffff8e13f1c0 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x27b/0x3b50 net/core/dev.c:4637
#8: ffffffff8e13f160 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
#8: ffffffff8e13f160 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline]
#8: ffffffff8e13f160 (rcu_read_lock){....}-{1:3}, at: br_dev_xmit+0x185/0x1840 net/bridge/br_device.c:52
#9: ffffffff8e13f1c0 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#9: ffffffff8e13f1c0 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:892 [inline]
#9: ffffffff8e13f1c0 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x27b/0x3b50 net/core/dev.c:4637
stack backtrace:
CPU: 1 UID: 0 PID: 8519 Comm: syz.1.728 Not tainted 6.16.0-rc5-syzkaller-01399-ga52f9f0d77f2 #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_deadlock_bug+0x28b/0x2a0 kernel/locking/lockdep.c:3044
check_deadlock kernel/locking/lockdep.c:3096 [inline]
validate_chain+0x1a3f/0x2140 kernel/locking/lockdep.c:3898
__lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240
lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
_raw_spin_lock_bh+0x36/0x50 kernel/locking/spinlock.c:178
spin_lock_bh include/linux/spinlock.h:356 [inline]
hsr_dev_xmit+0x19a/0x220 net/hsr/hsr_device.c:234
__netdev_start_xmit include/linux/netdevice.h:5217 [inline]
netdev_start_xmit include/linux/netdevice.h:5226 [inline]
xmit_one net/core/dev.c:3826 [inline]
dev_hard_start_xmit+0x2d7/0x830 net/core/dev.c:3842
__dev_queue_xmit+0x1b8d/0x3b50 net/core/dev.c:4712
dev_queue_xmit include/linux/netdevice.h:3358 [inline]
br_dev_queue_push_xmit+0x6c5/0x890 net/bridge/br_forward.c:53
NF_HOOK+0x31d/0x3c0 include/linux/netfilter.h:317
br_forward_finish+0xd3/0x130 net/bridge/br_forward.c:66
NF_HOOK+0x31d/0x3c0 include/linux/netfilter.h:317
__br_forward+0x41e/0x600 net/bridge/br_forward.c:115
deliver_clone net/bridge/br_forward.c:131 [inline]
maybe_deliver+0xb5/0x160 net/bridge/br_forward.c:190
br_flood+0x31a/0x6a0 net/bridge/br_forward.c:237
br_dev_xmit+0x11b3/0x1840 net/bridge/br_device.c:108
__netdev_start_xmit include/linux/netdevice.h:5217 [inline]
netdev_start_xmit include/linux/netdevice.h:5226 [inline]
xmit_one net/core/dev.c:3826 [inline]
dev_hard_start_xmit+0x2d7/0x830 net/core/dev.c:3842
__dev_queue_xmit+0x1b8d/0x3b50 net/core/dev.c:4712
dev_queue_xmit include/linux/netdevice.h:3358 [inline]
hsr_xmit net/hsr/hsr_forward.c:430 [inline]
hsr_forward_do net/hsr/hsr_forward.c:571 [inline]
hsr_forward_skb+0x158b/0x2860 net/hsr/hsr_forward.c:733
hsr_dev_xmit+0x1a5/0x220 net/hsr/hsr_device.c:235
__netdev_start_xmit include/linux/netdevice.h:5217 [inline]
netdev_start_xmit include/linux/netdevice.h:5226 [inline]
xmit_one net/core/dev.c:3826 [inline]
dev_hard_start_xmit+0x2d7/0x830 net/core/dev.c:3842
__dev_queue_xmit+0x1b8d/0x3b50 net/core/dev.c:4712
neigh_output include/net/neighbour.h:542 [inline]
ip6_finish_output2+0x11fb/0x16a0 net/ipv6/ip6_output.c:141
__ip6_finish_output net/ipv6/ip6_output.c:-1 [inline]
ip6_finish_output+0x234/0x7d0 net/ipv6/ip6_output.c:226
NF_HOOK include/linux/netfilter.h:317 [inline]
ndisc_send_skb+0xb54/0x1440 net/ipv6/ndisc.c:512
addrconf_rs_timer+0x369/0x670 net/ipv6/addrconf.c:4032
call_timer_fn+0x17e/0x5f0 kernel/time/timer.c:1747
expire_timers kernel/time/timer.c:1798 [inline]
__run_timers kernel/time/timer.c:2372 [inline]
__run_timer_base+0x61a/0x860 kernel/time/timer.c:2384
run_timer_base kernel/time/timer.c:2393 [inline]
run_timer_softirq+0xb7/0x180 kernel/time/timer.c:2403
handle_softirqs+0x286/0x870 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:__kasan_check_byte+0x2c/0x40 mm/kasan/common.c:561
Code: 1f 00 41 56 53 48 89 f3 49 89 fe e8 5e 14 00 00 84 c0 75 16 be 01 00 00 00 4c 89 f7 31 d2 48 89 d9 89 c3 e8 c6 03 00 00 89 d8 <5b> 41 5e e9 7c 24 50 09 cc cc cc cc cc cc cc cc cc cc cc cc 90 90
RSP: 0018:ffffc9000b93e940 EFLAGS: 00000202
RAX: 0000000000000001 RBX: ffffffff8172ab02 RCX: cf6e5d6e8f5eaa00
RDX: 0000000000000000 RSI: ffffffff8172ab02 RDI: 1ffffffff1c27e2c
RBP: ffffffff8172aae5 R08: 0000000000000000 R09: 0000000000000000
R10: ffffc9000b93eb18 R11: ffffffff81ad03a0 R12: 0000000000000002
R13: ffffffff8e13f160 R14: ffffffff8e13f160 R15: 0000000000000000
kasan_check_byte include/linux/kasan.h:399 [inline]
lock_acquire+0x8d/0x360 kernel/locking/lockdep.c:5845
rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
rcu_read_lock include/linux/rcupdate.h:841 [inline]
class_rcu_constructor include/linux/rcupdate.h:1155 [inline]
unwind_next_frame+0xc2/0x2390 arch/x86/kernel/unwind_orc.c:479
arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122
save_stack+0xf5/0x1f0 mm/page_owner.c:156
__reset_page_owner+0x71/0x1f0 mm/page_owner.c:308
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1248 [inline]
__free_frozen_pages+0xc71/0xe70 mm/page_alloc.c:2706
__slab_free+0x326/0x400 mm/slub.c:4554
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:329
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4148 [inline]
slab_alloc_node mm/slub.c:4197 [inline]
__kmalloc_cache_noprof+0x1be/0x3d0 mm/slub.c:4354
kmalloc_noprof include/linux/slab.h:905 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
copy_verifier_state+0x90f/0xed0 kernel/bpf/verifier.c:1763
is_state_visited kernel/bpf/verifier.c:19300 [inline]
do_check+0x4c44/0xd450 kernel/bpf/verifier.c:19462
do_check_common+0x168d/0x20b0 kernel/bpf/verifier.c:22807
do_check_main kernel/bpf/verifier.c:22898 [inline]
bpf_check+0x13664/0x19c60 kernel/bpf/verifier.c:24064
bpf_prog_load+0x1318/0x1930 kernel/bpf/syscall.c:2972
__sys_bpf+0x5f1/0x860 kernel/bpf/syscall.c:5836
__do_sys_bpf kernel/bpf/syscall.c:5943 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5941 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5941
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f191378e929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f19145ec038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f19139b6080 RCX: 00007f191378e929
RDX: 0000000000000094 RSI: 0000200000000840 RDI: 0000000000000005
RBP: 00007f1913810b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f19139b6080 R15: 00007ffce7b54438
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 00 41 56 add %al,0x56(%rcx)
3: 53 push %rbx
4: 48 89 f3 mov %rsi,%rbx
7: 49 89 fe mov %rdi,%r14
a: e8 5e 14 00 00 call 0x146d
f: 84 c0 test %al,%al
11: 75 16 jne 0x29
13: be 01 00 00 00 mov $0x1,%esi
18: 4c 89 f7 mov %r14,%rdi
1b: 31 d2 xor %edx,%edx
1d: 48 89 d9 mov %rbx,%rcx
20: 89 c3 mov %eax,%ebx
22: e8 c6 03 00 00 call 0x3ed
27: 89 d8 mov %ebx,%eax
* 29: 5b pop %rbx <-- trapping instruction
2a: 41 5e pop %r14
2c: e9 7c 24 50 09 jmp 0x95024ad
31: cc int3
32: cc int3
33: cc int3
34: cc int3
35: cc int3
36: cc int3
37: cc int3
38: cc int3
39: cc int3
3a: cc int3
3b: cc int3
3c: cc int3
3d: 90 nop
3e: 90 nop