============================================
WARNING: possible recursive locking detected
6.12.0-syzkaller-05480-gfcc79e1714e8 #0 Not tainted
--------------------------------------------
kworker/u8:4/62 is trying to acquire lock:
ffff88805d2aef30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
ffff88805d2aef30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: hsr_dev_xmit+0x18a/0x210 net/hsr/hsr_device.c:234
but task is already holding lock:
ffff8880297c2f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
ffff8880297c2f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: send_hsr_supervision_frame+0x27c/0xcc0 net/hsr/hsr_device.c:317
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
15 locks held by kworker/u8:4/62:
#0: ffff88801baed948 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
#0: ffff88801baed948 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1850 kernel/workqueue.c:3310
#1: ffffc9000215fd00 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline]
#1: ffffc9000215fd00 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1850 kernel/workqueue.c:3310
#2: ffffffff8fcd5810 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0x16a/0xcc0 net/core/net_namespace.c:586
#3: ffff88805cedb0e8 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1014 [inline]
#3: ffff88805cedb0e8 (&dev->mutex){....}-{4:4}, at: devl_dev_lock net/devlink/devl_internal.h:108 [inline]
#3: ffff88805cedb0e8 (&dev->mutex){....}-{4:4}, at: devlink_pernet_pre_exit+0x13b/0x440 net/devlink/core.c:506
#4: ffff888079433250 (&devlink->lock_key#16){+.+.}-{4:4}, at: devl_lock net/devlink/core.c:276 [inline]
#4: ffff888079433250 (&devlink->lock_key#16){+.+.}-{4:4}, at: devl_dev_lock net/devlink/devl_internal.h:109 [inline]
#4: ffff888079433250 (&devlink->lock_key#16){+.+.}-{4:4}, at: devlink_pernet_pre_exit+0x14d/0x440 net/devlink/core.c:506
#5: ffffffff8fce2348 (rtnl_mutex){+.+.}-{4:4}, at: nsim_destroy+0x71/0x5c0 drivers/net/netdevsim/netdev.c:816
#6: ffffc90000a18c00 ((&hsr->announce_timer)){+.-.}-{0:0}, at: call_timer_fn+0xc0/0x650 kernel/time/timer.c:1790
#7: ffffffff8e93c860 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#7: ffffffff8e93c860 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#7: ffffffff8e93c860 (rcu_read_lock){....}-{1:3}, at: hsr_announce+0xaa/0x3a0 net/hsr/hsr_device.c:406
#8: ffff8880297c2f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
#8: ffff8880297c2f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: send_hsr_supervision_frame+0x27c/0xcc0 net/hsr/hsr_device.c:317
#9: ffffffff8e93c860 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#9: ffffffff8e93c860 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#9: ffffffff8e93c860 (rcu_read_lock){....}-{1:3}, at: hsr_forward_skb+0xb6/0x2ac0 net/hsr/hsr_forward.c:723
#10: ffffffff8e93c8c0 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#10: ffffffff8e93c8c0 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:901 [inline]
#10: ffffffff8e93c8c0 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x2f4/0x3f50 net/core/dev.c:4359
#11: ffffffff8e93c860 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#11: ffffffff8e93c860 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#11: ffffffff8e93c860 (rcu_read_lock){....}-{1:3}, at: bond_start_xmit+0x128/0x1c40 drivers/net/bonding/bond_main.c:5603
#12: ffffffff8e93c8c0 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#12: ffffffff8e93c8c0 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:901 [inline]
#12: ffffffff8e93c8c0 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x2f4/0x3f50 net/core/dev.c:4359
#13: ffffffff8e93c860 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#13: ffffffff8e93c860 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#13: ffffffff8e93c860 (rcu_read_lock){....}-{1:3}, at: br_dev_xmit+0x21d/0x1b40 net/bridge/br_device.c:50
#14: ffffffff8e93c8c0 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#14: ffffffff8e93c8c0 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:901 [inline]
#14: ffffffff8e93c8c0 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x2f4/0x3f50 net/core/dev.c:4359
stack backtrace:
CPU: 1 UID: 0 PID: 62 Comm: kworker/u8:4 Not tainted 6.12.0-syzkaller-05480-gfcc79e1714e8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Workqueue: netns cleanup_net
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3037
check_deadlock kernel/locking/lockdep.c:3089 [inline]
validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891
__lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
_raw_spin_lock_bh+0x35/0x50 kernel/locking/spinlock.c:178
spin_lock_bh include/linux/spinlock.h:356 [inline]
hsr_dev_xmit+0x18a/0x210 net/hsr/hsr_device.c:234
__netdev_start_xmit include/linux/netdevice.h:5002 [inline]
netdev_start_xmit include/linux/netdevice.h:5011 [inline]
xmit_one net/core/dev.c:3590 [inline]
dev_hard_start_xmit+0x27a/0x7e0 net/core/dev.c:3606
__dev_queue_xmit+0x1b73/0x3f50 net/core/dev.c:4434
dev_queue_xmit include/linux/netdevice.h:3168 [inline]
br_dev_queue_push_xmit+0x726/0x900 net/bridge/br_forward.c:53
NF_HOOK+0x3a7/0x460 include/linux/netfilter.h:314
br_forward_finish+0xd8/0x130 net/bridge/br_forward.c:66
NF_HOOK+0x3a7/0x460 include/linux/netfilter.h:314
__br_forward+0x489/0x660 net/bridge/br_forward.c:115
deliver_clone net/bridge/br_forward.c:131 [inline]
maybe_deliver+0xb3/0x150 net/bridge/br_forward.c:190
br_flood+0x2e4/0x660 net/bridge/br_forward.c:236
br_dev_xmit+0x1202/0x1b40
__netdev_start_xmit include/linux/netdevice.h:5002 [inline]
netdev_start_xmit include/linux/netdevice.h:5011 [inline]
xmit_one net/core/dev.c:3590 [inline]
dev_hard_start_xmit+0x27a/0x7e0 net/core/dev.c:3606
__dev_queue_xmit+0x1b73/0x3f50 net/core/dev.c:4434
bond_start_xmit+0x1389/0x1c40 drivers/net/bonding/bond_main.c:5605
__netdev_start_xmit include/linux/netdevice.h:5002 [inline]
netdev_start_xmit include/linux/netdevice.h:5011 [inline]
xmit_one net/core/dev.c:3590 [inline]
dev_hard_start_xmit+0x27a/0x7e0 net/core/dev.c:3606
__dev_queue_xmit+0x1b73/0x3f50 net/core/dev.c:4434
dev_queue_xmit include/linux/netdevice.h:3168 [inline]
hsr_xmit net/hsr/hsr_forward.c:430 [inline]
hsr_forward_do net/hsr/hsr_forward.c:571 [inline]
hsr_forward_skb+0x171c/0x2ac0 net/hsr/hsr_forward.c:728
send_hsr_supervision_frame+0x63b/0xcc0 net/hsr/hsr_device.c:351
hsr_announce+0x1f8/0x3a0 net/hsr/hsr_device.c:408
call_timer_fn+0x18e/0x650 kernel/time/timer.c:1793
expire_timers kernel/time/timer.c:1844 [inline]
__run_timers kernel/time/timer.c:2418 [inline]
__run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2430
run_timer_base kernel/time/timer.c:2439 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2449
handle_softirqs+0x2c5/0x980 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf7/0x220 kernel/softirq.c:655
irq_exit_rcu+0x9/0x30 kernel/softirq.c:671
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lockdep_unregister_key+0x56d/0x610 kernel/locking/lockdep.c:6593
Code: 2b 94 48 c7 c6 c0 e2 70 81 e8 3f 27 0a 00 e8 aa 3b 0a 00 e9 e5 fb ff ff e8 80 30 5e 0a 41 f7 c7 00 02 00 00 74 d0 fb 45 84 f6 <75> cf eb e0 90 0f 0b 90 45 31 f6 e9 62 ff ff ff 90 0f 0b 90 e9 a1
RSP: 0018:ffffc9000215f380 EFLAGS: 00000202
RAX: dffffc0000000000 RBX: 1ffff9200042be78 RCX: ffffffff9a413903
RDX: 0000000000000001 RSI: ffffffff8c0ae040 RDI: ffffffff8c6131e0
RBP: ffffc9000215f458 R08: ffffffff942dde5f R09: 1ffffffff285bbcb
R10: dffffc0000000000 R11: fffffbfff285bbcc R12: ffffc9000215f3c0
R13: 1ffff9200042be74 R14: ffff88802d3ff201 R15: 0000000000000206
__qdisc_destroy+0x165/0x410 net/sched/sch_generic.c:1085
qdisc_put net/sched/sch_generic.c:1111 [inline]
dev_shutdown+0x357/0x450 net/sched/sch_generic.c:1499
unregister_netdevice_many_notify+0x995/0x1da0 net/core/dev.c:11509
unregister_netdevice_many net/core/dev.c:11584 [inline]
unregister_netdevice_queue+0x303/0x370 net/core/dev.c:11456
unregister_netdevice include/linux/netdevice.h:3192 [inline]
nsim_destroy+0x180/0x5c0 drivers/net/netdevsim/netdev.c:821
__nsim_dev_port_del+0x14b/0x1b0 drivers/net/netdevsim/dev.c:1428
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1440 [inline]
nsim_dev_reload_destroy+0x28a/0x490 drivers/net/netdevsim/dev.c:1661
nsim_dev_reload_down+0x98/0xd0 drivers/net/netdevsim/dev.c:968
devlink_reload+0x18b/0x870 net/devlink/dev.c:461
devlink_pernet_pre_exit+0x1f3/0x440 net/devlink/core.c:509
ops_pre_exit_list net/core/net_namespace.c:162 [inline]
cleanup_net+0x615/0xcc0 net/core/net_namespace.c:612
process_one_work kernel/workqueue.c:3229 [inline]
process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310
worker_thread+0x870/0xd30 kernel/workqueue.c:3391
kthread+0x2f0/0x390 kernel/kthread.c:389
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
----------------
Code disassembly (best guess):
0: 2b 94 48 c7 c6 c0 e2 sub -0x1d3f3939(%rax,%rcx,2),%edx
7: 70 81 jo 0xffffff8a
9: e8 3f 27 0a 00 call 0xa274d
e: e8 aa 3b 0a 00 call 0xa3bbd
13: e9 e5 fb ff ff jmp 0xfffffbfd
18: e8 80 30 5e 0a call 0xa5e309d
1d: 41 f7 c7 00 02 00 00 test $0x200,%r15d
24: 74 d0 je 0xfffffff6
26: fb sti
27: 45 84 f6 test %r14b,%r14b
* 2a: 75 cf jne 0xfffffffb <-- trapping instruction
2c: eb e0 jmp 0xe
2e: 90 nop
2f: 0f 0b ud2
31: 90 nop
32: 45 31 f6 xor %r14d,%r14d
35: e9 62 ff ff ff jmp 0xffffff9c
3a: 90 nop
3b: 0f 0b ud2
3d: 90 nop
3e: e9 .byte 0xe9
3f: a1 .byte 0xa1