======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/0:12/7935 is trying to acquire lock:
ffff888037489030 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:348 [inline]
ffff888037489030 (&hsr->seqnr_lock){+.-.}-{3:3}, at: hsr_dev_xmit+0x237/0x360 net/hsr/hsr_device.c:235
but task is already holding lock:
ffff888057d0a958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: spin_lock include/linux/spinlock.h:342 [inline]
ffff888057d0a958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: __netif_tx_lock include/linux/netdevice.h:4799 [inline]
ffff888057d0a958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: sch_direct_xmit+0x15f/0x4c0 net/sched/sch_generic.c:370
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}:
__raw_spin_lock include/linux/spinlock_api_smp.h:158 [inline]
_raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:158
spin_lock include/linux/spinlock.h:342 [inline]
__netif_tx_lock include/linux/netdevice.h:4799 [inline]
sch_direct_xmit+0x15f/0x4c0 net/sched/sch_generic.c:370
__dev_xmit_skb net/core/dev.c:4211 [inline]
__dev_queue_xmit+0x1754/0x37f0 net/core/dev.c:4833
dev_queue_xmit include/linux/netdevice.h:3436 [inline]
hsr_xmit net/hsr/hsr_forward.c:440 [inline]
hsr_forward_do net/hsr/hsr_forward.c:581 [inline]
hsr_forward_skb+0x152a/0x28c0 net/hsr/hsr_forward.c:743
hsr_dev_xmit+0x242/0x360 net/hsr/hsr_device.c:236
__netdev_start_xmit include/linux/netdevice.h:5387 [inline]
netdev_start_xmit include/linux/netdevice.h:5396 [inline]
xmit_one net/core/dev.c:3889 [inline]
dev_hard_start_xmit+0x2cd/0x830 net/core/dev.c:3905
__dev_queue_xmit+0x1435/0x37f0 net/core/dev.c:4872
NF_HOOK_COND include/linux/netfilter.h:307 [inline]
ip6_output+0x337/0x540 net/ipv6/ip6_output.c:246
dst_output include/net/dst.h:471 [inline]
NF_HOOK+0x177/0x4f0 include/linux/netfilter.h:318
mld_sendpack+0x890/0xe10 net/ipv6/mcast.c:1853
mld_send_cr net/ipv6/mcast.c:2154 [inline]
mld_ifc_work+0x839/0xe70 net/ipv6/mcast.c:2694
process_one_work kernel/workqueue.c:3314 [inline]
process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3397
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3478
kthread+0x389/0x470 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
-> #0 (&hsr->seqnr_lock){+.-.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x1520/0x2cd0 kernel/locking/lockdep.c:5237
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:150 [inline]
_raw_spin_lock_bh+0x36/0x50 kernel/locking/spinlock.c:182
spin_lock_bh include/linux/spinlock.h:348 [inline]
hsr_dev_xmit+0x237/0x360 net/hsr/hsr_device.c:235
__netdev_start_xmit include/linux/netdevice.h:5387 [inline]
netdev_start_xmit include/linux/netdevice.h:5396 [inline]
xmit_one net/core/dev.c:3889 [inline]
dev_hard_start_xmit+0x2cd/0x830 net/core/dev.c:3905
__dev_queue_xmit+0x1435/0x37f0 net/core/dev.c:4872
NF_HOOK+0x33a/0x3c0 include/linux/netfilter.h:-1
arp_xmit+0x16c/0x270 net/ipv4/arp.c:665
arp_solicit+0xbdc/0xe40 net/ipv4/arp.c:392
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
neigh_output include/net/neighbour.h:560 [inline]
ip_finish_output2+0xc4b/0x10b0 net/ipv4/ip_output.c:236
NF_HOOK_COND include/linux/netfilter.h:307 [inline]
ip_output+0x29f/0x450 net/ipv4/ip_output.c:437
iptunnel_xmit+0x626/0xd10 net/ipv4/ip_tunnel_core.c:97
ip_tunnel_xmit+0x195b/0x2040 net/ipv4/ip_tunnel.c:848
__gre_xmit+0x19e/0x240 net/ipv4/ip_gre.c:491
erspan_xmit+0xad5/0x1590 net/ipv4/ip_gre.c:750
__netdev_start_xmit include/linux/netdevice.h:5387 [inline]
netdev_start_xmit include/linux/netdevice.h:5396 [inline]
xmit_one net/core/dev.c:3889 [inline]
dev_hard_start_xmit+0x2cd/0x830 net/core/dev.c:3905
sch_direct_xmit+0x257/0x4c0 net/sched/sch_generic.c:372
__dev_xmit_skb net/core/dev.c:4211 [inline]
__dev_queue_xmit+0x1754/0x37f0 net/core/dev.c:4833
NF_HOOK_COND include/linux/netfilter.h:307 [inline]
ip6_output+0x337/0x540 net/ipv6/ip6_output.c:246
dst_output include/net/dst.h:471 [inline]
NF_HOOK include/linux/netfilter.h:318 [inline]
ndisc_send_skb+0xcb2/0x1650 net/ipv6/ndisc.c:512
addrconf_rs_timer+0x2d2/0x6c0 net/ipv6/addrconf.c:4066
call_timer_fn+0x192/0x5e0 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+0x225/0x840 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x220 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
get_next_corpse net/netfilter/nf_conntrack_core.c:-1 [inline]
nf_ct_iterate_cleanup+0xb7/0x500 net/netfilter/nf_conntrack_core.c:2335
iterate_cleanup_work+0xdc/0x180 net/netfilter/nf_nat_masquerade.c:87
process_one_work kernel/workqueue.c:3314 [inline]
process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3397
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3478
kthread+0x389/0x470 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
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&qdisc_xmit_lock_key#4);
lock(&hsr->seqnr_lock);
lock(&qdisc_xmit_lock_key#4);
lock(&hsr->seqnr_lock);
*** DEADLOCK ***
14 locks held by kworker/0:12/7935:
#0: ffff88813fe43140 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3289 [inline]
#0: ffff88813fe43140 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3397
#1: ffffc9000362fc40 ((work_completion)(&w->work)#2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3289 [inline]
#1: ffffc9000362fc40 ((work_completion)(&w->work)#2){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3397
#2: ffffffff8fe409c0 (nf_conntrack_mutex){+.+.}-{4:4}, at: nf_ct_iterate_cleanup+0x3f/0x500 net/netfilter/nf_conntrack_core.c:2334
#3: ffffc90000007cc0 ((&ndev->rs_timer)){+.-.}-{0:0}, at: call_timer_fn+0xd4/0x5e0 kernel/time/timer.c:1745
#4: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#4: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#4: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: ndisc_send_skb+0x203/0x1650 net/ipv6/ndisc.c:482
#5: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#5: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#5: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x11e/0x540 net/ipv6/ip6_output.c:234
#6: ffffffff8e95c7e0 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#6: ffffffff8e95c7e0 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:891 [inline]
#6: ffffffff8e95c7e0 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x37f0 net/core/dev.c:4793
#7: ffff88806b537228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#5){+...}-{3:3}, at: spin_trylock include/linux/spinlock.h:354 [inline]
#7: ffff88806b537228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#5){+...}-{3:3}, at: qdisc_run_begin include/net/sch_generic.h:205 [inline]
#7: ffff88806b537228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#5){+...}-{3:3}, at: __dev_xmit_skb net/core/dev.c:4198 [inline]
#7: ffff88806b537228 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#5){+...}-{3:3}, at: __dev_queue_xmit+0x112b/0x37f0 net/core/dev.c:4833
#8: ffff888057d0a958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: spin_lock include/linux/spinlock.h:342 [inline]
#8: ffff888057d0a958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: __netif_tx_lock include/linux/netdevice.h:4799 [inline]
#8: ffff888057d0a958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: sch_direct_xmit+0x15f/0x4c0 net/sched/sch_generic.c:370
#9: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#9: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#9: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: ip_output+0x5a/0x450 net/ipv4/ip_output.c:432
#10: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#10: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#10: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: ip_finish_output2+0x3de/0x10b0 net/ipv4/ip_output.c:229
#11: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#11: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#11: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: arp_xmit+0x23/0x270 net/ipv4/arp.c:663
#12: ffffffff8e95c7e0 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#12: ffffffff8e95c7e0 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:891 [inline]
#12: ffffffff8e95c7e0 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x29b/0x37f0 net/core/dev.c:4793
#13: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#13: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#13: ffffffff8e95c780 (rcu_read_lock){....}-{1:3}, at: hsr_dev_xmit+0x2d/0x360 net/hsr/hsr_device.c:229
stack backtrace:
CPU: 0 UID: 0 PID: 7935 Comm: kworker/0:12 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Workqueue: events iterate_cleanup_work
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043
check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x1520/0x2cd0 kernel/locking/lockdep.c:5237
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:150 [inline]
_raw_spin_lock_bh+0x36/0x50 kernel/locking/spinlock.c:182
spin_lock_bh include/linux/spinlock.h:348 [inline]
hsr_dev_xmit+0x237/0x360 net/hsr/hsr_device.c:235
__netdev_start_xmit include/linux/netdevice.h:5387 [inline]
netdev_start_xmit include/linux/netdevice.h:5396 [inline]
xmit_one net/core/dev.c:3889 [inline]
dev_hard_start_xmit+0x2cd/0x830 net/core/dev.c:3905
__dev_queue_xmit+0x1435/0x37f0 net/core/dev.c:4872
NF_HOOK+0x33a/0x3c0 include/linux/netfilter.h:-1
arp_xmit+0x16c/0x270 net/ipv4/arp.c:665
arp_solicit+0xbdc/0xe40 net/ipv4/arp.c:392
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
neigh_output include/net/neighbour.h:560 [inline]
ip_finish_output2+0xc4b/0x10b0 net/ipv4/ip_output.c:236
NF_HOOK_COND include/linux/netfilter.h:307 [inline]
ip_output+0x29f/0x450 net/ipv4/ip_output.c:437
iptunnel_xmit+0x626/0xd10 net/ipv4/ip_tunnel_core.c:97
ip_tunnel_xmit+0x195b/0x2040 net/ipv4/ip_tunnel.c:848
__gre_xmit+0x19e/0x240 net/ipv4/ip_gre.c:491
erspan_xmit+0xad5/0x1590 net/ipv4/ip_gre.c:750
__netdev_start_xmit include/linux/netdevice.h:5387 [inline]
netdev_start_xmit include/linux/netdevice.h:5396 [inline]
xmit_one net/core/dev.c:3889 [inline]
dev_hard_start_xmit+0x2cd/0x830 net/core/dev.c:3905
sch_direct_xmit+0x257/0x4c0 net/sched/sch_generic.c:372
__dev_xmit_skb net/core/dev.c:4211 [inline]
__dev_queue_xmit+0x1754/0x37f0 net/core/dev.c:4833
NF_HOOK_COND include/linux/netfilter.h:307 [inline]
ip6_output+0x337/0x540 net/ipv6/ip6_output.c:246
dst_output include/net/dst.h:471 [inline]
NF_HOOK include/linux/netfilter.h:318 [inline]
ndisc_send_skb+0xcb2/0x1650 net/ipv6/ndisc.c:512
addrconf_rs_timer+0x2d2/0x6c0 net/ipv6/addrconf.c:4066
call_timer_fn+0x192/0x5e0 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+0x225/0x840 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x220 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:get_next_corpse net/netfilter/nf_conntrack_core.c:-1 [inline]
RIP: 0010:nf_ct_iterate_cleanup+0xb7/0x500 net/netfilter/nf_conntrack_core.c:2335
Code: 18 45 31 e4 44 89 e0 45 89 e4 25 ff 03 00 00 c1 e0 06 48 8d 80 40 4d 66 8e 48 89 44 24 10 4a 8d 04 e5 00 00 00 00 4c 89 24 24 <48> 89 44 24 28 4c 8b 2d 4d 51 6a 06 49 01 c5 4d 89 ec 49 c1 ec 03
RSP: 0018:ffffc9000362f9c8 EFLAGS: 00000206
RAX: 000000000012ac58 RBX: ffffc9000362fa60 RCX: ffff888036890000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000001 R08: ffffffff90300cf7 R09: 1ffffffff206019e
R10: dffffc0000000000 R11: fffffbfff206019f R12: 000000000002558b
R13: ffff88814952ac50 R14: dffffc0000000000 R15: 1ffff920006c5f4c
iterate_cleanup_work+0xdc/0x180 net/netfilter/nf_nat_masquerade.c:87
process_one_work kernel/workqueue.c:3314 [inline]
process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3397
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3478
kthread+0x389/0x470 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):
0: 18 45 31 sbb %al,0x31(%rbp)
3: e4 44 in $0x44,%al
5: 89 e0 mov %esp,%eax
7: 45 89 e4 mov %r12d,%r12d
a: 25 ff 03 00 00 and $0x3ff,%eax
f: c1 e0 06 shl $0x6,%eax
12: 48 8d 80 40 4d 66 8e lea -0x7199b2c0(%rax),%rax
19: 48 89 44 24 10 mov %rax,0x10(%rsp)
1e: 4a 8d 04 e5 00 00 00 lea 0x0(,%r12,8),%rax
25: 00
26: 4c 89 24 24 mov %r12,(%rsp)
* 2a: 48 89 44 24 28 mov %rax,0x28(%rsp) <-- trapping instruction
2f: 4c 8b 2d 4d 51 6a 06 mov 0x66a514d(%rip),%r13 # 0x66a5183
36: 49 01 c5 add %rax,%r13
39: 4d 89 ec mov %r13,%r12
3c: 49 c1 ec 03 shr $0x3,%r12