============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
kworker/u8:14/6875 is trying to acquire lock:
ffff8880674a9070 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:353 [inline]
ffff8880674a9070 (&hsr->seqnr_lock){+.-.}-{3:3}, at: hsr_dev_xmit+0x237/0x360 net/hsr/hsr_device.c:235
but task is already holding lock:
ffff8880674a9070 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:353 [inline]
ffff8880674a9070 (&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 kworker/u8:14/6875: 19, last CPU#0:
#0: ffff88801d2d6140 ((wq_completion)netns){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#0: ffff88801d2d6140 ((wq_completion)netns){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#0: ffff88801d2d6140 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3361 [inline]
#0: ffff88801d2d6140 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3479
#1: ffffc900066c7c40 (net_cleanup_work){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#1: ffffc900066c7c40 (net_cleanup_work){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#1: ffffc900066c7c40 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3361 [inline]
#1: ffffc900066c7c40 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3479
#2: ffffffff91247228 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0xf5/0x810 net/core/net_namespace.c:677
#3: ffff88802c5d0128 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline]
#3: ffff88802c5d0128 (&dev->mutex){....}-{4:4}, at: devl_dev_lock net/devlink/devl_internal.h:124 [inline]
#3: ffff88802c5d0128 (&dev->mutex){....}-{4:4}, at: devlink_pernet_pre_exit+0x129/0x420 net/devlink/core.c:581
#4: ffff88802c5d7258 (&devlink->lock_key){+.+.}-{4:4}, at: devl_lock net/devlink/core.c:314 [inline]
#4: ffff88802c5d7258 (&devlink->lock_key){+.+.}-{4:4}, at: devl_dev_lock net/devlink/devl_internal.h:125 [inline]
#4: ffff88802c5d7258 (&devlink->lock_key){+.+.}-{4:4}, at: devlink_pernet_pre_exit+0x142/0x420 net/devlink/core.c:581
#5: ffffffff91255a80 (rtnl_mutex){+.+.}-{4:4}, at: nsim_destroy+0x173/0x800 drivers/net/netdevsim/netdev.c:1193
#6: ffff88801d2d4aa0 (&root->kernfs_supers_rwsem){++++}-{4:4}, at: kernfs_remove_by_name_ns+0x3f/0x140 fs/kernfs/dir.c:1791
#7: ffff88801d2d4980 (&root->kernfs_rwsem){++++}-{4:4}, at: kernfs_remove_by_name_ns+0x4e/0x140 fs/kernfs/dir.c:1792
#8: ffffc90000007cc0 ((&hsr->announce_timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x5f0 kernel/time/timer.c:1745
#9: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#9: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#9: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: hsr_announce+0x89/0x370 net/hsr/hsr_device.c:446
#10: ffff8880674a9070 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:353 [inline]
#10: ffff8880674a9070 (&hsr->seqnr_lock){+.-.}-{3:3}, at: send_prp_supervision_frame+0x1fb/0x8b0 net/hsr/hsr_device.c:401
#11: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#11: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#11: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: hsr_forward_skb+0xb9/0x2b70 net/hsr/hsr_forward.c:772
#12: ffffffff8fd5c900 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#12: ffffffff8fd5c900 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:902 [inline]
#12: ffffffff8fd5c900 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3920 net/core/dev.c:4872
#13: ffff88802b875228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#4){+...}-{3:3}, at: spin_trylock include/linux/spinlock.h:359 [inline]
#13: ffff88802b875228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#4){+...}-{3:3}, at: qdisc_run_begin include/net/sch_generic.h:206 [inline]
#13: ffff88802b875228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#4){+...}-{3:3}, at: __dev_xmit_skb net/core/dev.c:4264 [inline]
#13: ffff88802b875228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#4){+...}-{3:3}, at: __dev_queue_xmit+0x114e/0x3920 net/core/dev.c:4916
#14: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#14: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#14: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540 net/ipv6/ip6_output.c:236
#15: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#15: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#15: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: ndisc_send_skb+0x203/0x1650 net/ipv6/ndisc.c:483
#16: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#16: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#16: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540 net/ipv6/ip6_output.c:236
#17: ffffffff8fd5c900 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#17: ffffffff8fd5c900 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:902 [inline]
#17: ffffffff8fd5c900 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x3920 net/core/dev.c:4872
#18: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#18: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#18: ffffffff8fd5c8a0 (rcu_read_lock){....}-{1:3}, at: hsr_dev_xmit+0x2d/0x360 net/hsr/hsr_device.c:229
stack backtrace:
CPU: 0 UID: 0 PID: 6875 Comm: kworker/u8:14 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: netns cleanup_net
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_deadlock_bug+0x27a/0x290 kernel/locking/lockdep.c:3085
check_deadlock kernel/locking/lockdep.c:3137 [inline]
validate_chain kernel/locking/lockdep.c:3939 [inline]
__lock_acquire+0x25db/0x2de0 kernel/locking/lockdep.c:5288
lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
__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:5432 [inline]
netdev_start_xmit include/linux/netdevice.h:5441 [inline]
xmit_one net/core/dev.c:3953 [inline]
dev_hard_start_xmit+0x2cd/0x830 net/core/dev.c:3969
__dev_queue_xmit+0x14d1/0x3920 net/core/dev.c:4958
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:472 [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+0xa0d/0xf70 net/ipv6/ip6_gre.c:904
__netdev_start_xmit include/linux/netdevice.h:5432 [inline]
netdev_start_xmit include/linux/netdevice.h:5441 [inline]
xmit_one net/core/dev.c:3953 [inline]
dev_hard_start_xmit+0x2cd/0x830 net/core/dev.c:3969
sch_direct_xmit+0x257/0x4c0 net/sched/sch_generic.c:372
__dev_xmit_skb net/core/dev.c:4277 [inline]
__dev_queue_xmit+0x179a/0x3920 net/core/dev.c:4916
dev_queue_xmit include/linux/netdevice.h:3464 [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:758
irq_exit_rcu+0x9/0x30 kernel/softirq.c:775
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:finish_task_switch+0x413/0xc60 kernel/sched/core.c:5384
Code: 04 00 00 41 c7 84 24 20 0e 00 00 00 00 00 00 0f 1f 44 00 00 49 83 c4 48 4c 89 e7 e8 47 20 55 0a e8 12 2f 3a 00 fb 4c 8b 65 c8 <49> 8d bc 24 18 17 00 00 48 89 f8 48 c1 e8 03 42 0f b6 04 30 84 c0
RSP: 0018:ffffc900066c6f00 EFLAGS: 00000202
RAX: 00000000000d12e9 RBX: ffff8880b843c8e0 RCX: 8000000000000001
RDX: 0000000000000006 RSI: ffffffff8e46914c RDI: ffffffff8c6dd880
RBP: ffffc900066c6f50 R08: ffffffff917a717f R09: 1ffffffff22f4e2f
R10: dffffc0000000000 R11: fffffbfff22f4e30 R12: ffff888028b2ddc0
R13: ffff8880b843c8a8 R14: dffffc0000000000 R15: 1ffff1101708791c
context_switch kernel/sched/core.c:5536 [inline]
__schedule+0x17e3/0x58f0 kernel/sched/core.c:7284
preempt_schedule_common+0x7f/0xd0 kernel/sched/core.c:7463
preempt_schedule_thunk+0x16/0x40 arch/x86/entry/thunk.S:12
__raw_spin_unlock include/linux/spinlock_api_smp.h:201 [inline]
_raw_spin_unlock+0x41/0x50 kernel/locking/spinlock.c:213
spin_unlock include/linux/spinlock.h:401 [inline]
kernfs_put+0x60c/0x820 fs/kernfs/dir.c:616
kernfs_remove_by_name_ns+0xc8/0x140 fs/kernfs/dir.c:1798
kernfs_remove_by_name include/linux/kernfs.h:644 [inline]
remove_files fs/sysfs/group.c:28 [inline]
sysfs_remove_group+0x101/0x2e0 fs/sysfs/group.c:328
sysfs_remove_groups+0x54/0xb0 fs/sysfs/group.c:352
net_rx_queue_update_kobjects+0x6b7/0x780 net/core/net-sysfs.c:1316
remove_queue_kobjects net/core/net-sysfs.c:2148 [inline]
netdev_unregister_kobject+0xff/0x450 net/core/net-sysfs.c:2304
unregister_netdevice_many_notify+0x1be1/0x2140 net/core/dev.c:12597
unregister_netdevice_many net/core/dev.c:12635 [inline]
unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12436
unregister_netdevice include/linux/netdevice.h:3490 [inline]
nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1198
__nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1472
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1486 [inline]
nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1710
nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:963
devlink_reload+0x1c5/0x890 net/devlink/dev.c:462
devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:584
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235
cleanup_net+0x572/0x810 net/core/net_namespace.c:706
process_one_work kernel/workqueue.c:3396 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560
kthread+0x38b/0x480 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 00 00 add %al,(%rax)
2: 41 c7 84 24 20 0e 00 movl $0x0,0xe20(%r12)
9: 00 00 00 00 00
e: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
13: 49 83 c4 48 add $0x48,%r12
17: 4c 89 e7 mov %r12,%rdi
1a: e8 47 20 55 0a call 0xa552066
1f: e8 12 2f 3a 00 call 0x3a2f36
24: fb sti
25: 4c 8b 65 c8 mov -0x38(%rbp),%r12
* 29: 49 8d bc 24 18 17 00 lea 0x1718(%r12),%rdi <-- trapping instruction
30: 00
31: 48 89 f8 mov %rdi,%rax
34: 48 c1 e8 03 shr $0x3,%rax
38: 42 0f b6 04 30 movzbl (%rax,%r14,1),%eax
3d: 84 c0 test %al,%al