============================================
WARNING: possible recursive locking detected
6.1.125-syzkaller #0 Not tainted
--------------------------------------------
syz.2.1892/9134 is trying to acquire lock:
ffff88807d91d218 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
ffff88807d91d218 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+.-.}-{2:2}, at: __dev_xmit_skb net/core/dev.c:3894 [inline]
ffff88807d91d218 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+.-.}-{2:2}, at: __dev_queue_xmit+0x22db/0x3d50 net/core/dev.c:4269
but task is already holding lock:
ffff888057776258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+.-.}-{2:2}, at: spin_trylock include/linux/spinlock.h:361 [inline]
ffff888057776258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+.-.}-{2:2}, at: qdisc_run_begin include/net/sch_generic.h:195 [inline]
ffff888057776258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+.-.}-{2:2}, at: __dev_xmit_skb net/core/dev.c:3851 [inline]
ffff888057776258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+.-.}-{2:2}, at: __dev_queue_xmit+0x12c7/0x3d50 net/core/dev.c:4269
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(dev->qdisc_tx_busylock ?: &qdisc_tx_busylock);
lock(dev->qdisc_tx_busylock ?: &qdisc_tx_busylock);
*** DEADLOCK ***
May be due to missing lock nesting notation
10 locks held by syz.2.1892/9134:
#0: ffffffff8e50b968 (rtnl_mutex){+.+.}-{3:3}, at: tun_detach drivers/net/tun.c:698 [inline]
#0: ffffffff8e50b968 (rtnl_mutex){+.+.}-{3:3}, at: tun_chr_close+0x3a/0x1b0 drivers/net/tun.c:3492
#1: ffffc90000007bc0 ((&ndev->rs_timer)){+.-.}-{0:0}, at: call_timer_fn+0xc2/0x6b0 kernel/time/timer.c:1501
#2: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#2: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#2: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: ip6_nd_hdr net/ipv6/ndisc.c:454 [inline]
#2: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: ndisc_send_skb+0x5a8/0x14e0 net/ipv6/ndisc.c:505
#3: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#3: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#3: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: ip6_finish_output2+0x698/0x15f0 net/ipv6/ip6_output.c:123
#4: ffffffff8d32b120 (rcu_read_lock_bh){....}-{1:2}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#4: ffffffff8d32b120 (rcu_read_lock_bh){....}-{1:2}, at: rcu_read_lock_bh include/linux/rcupdate.h:843 [inline]
#4: ffffffff8d32b120 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x2d6/0x3d50 net/core/dev.c:4226
#5: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#5: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#5: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: bond_start_xmit+0x128/0x1d50 drivers/net/bonding/bond_main.c:5523
#6: ffffffff8d32b120 (rcu_read_lock_bh){....}-{1:2}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#6: ffffffff8d32b120 (rcu_read_lock_bh){....}-{1:2}, at: rcu_read_lock_bh include/linux/rcupdate.h:843 [inline]
#6: ffffffff8d32b120 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x2d6/0x3d50 net/core/dev.c:4226
#7: ffff888057776258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+.-.}-{2:2}, at: spin_trylock include/linux/spinlock.h:361 [inline]
#7: ffff888057776258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+.-.}-{2:2}, at: qdisc_run_begin include/net/sch_generic.h:195 [inline]
#7: ffff888057776258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+.-.}-{2:2}, at: __dev_xmit_skb net/core/dev.c:3851 [inline]
#7: ffff888057776258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+.-.}-{2:2}, at: __dev_queue_xmit+0x12c7/0x3d50 net/core/dev.c:4269
#8: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#8: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#8: ffffffff8d32b0c0 (rcu_read_lock){....}-{1:2}, at: ip_finish_output2+0x402/0x1330 net/ipv4/ip_output.c:221
#9: ffffffff8d32b120 (rcu_read_lock_bh){....}-{1:2}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#9: ffffffff8d32b120 (rcu_read_lock_bh){....}-{1:2}, at: rcu_read_lock_bh include/linux/rcupdate.h:843 [inline]
#9: ffffffff8d32b120 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x2d6/0x3d50 net/core/dev.c:4226
stack backtrace:
CPU: 0 PID: 9134 Comm: syz.2.1892 Not tainted 6.1.125-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
print_deadlock_bug kernel/locking/lockdep.c:2983 [inline]
check_deadlock kernel/locking/lockdep.c:3026 [inline]
validate_chain+0x4711/0x5950 kernel/locking/lockdep.c:3812
__lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:351 [inline]
__dev_xmit_skb net/core/dev.c:3894 [inline]
__dev_queue_xmit+0x22db/0x3d50 net/core/dev.c:4269
dev_queue_xmit include/linux/netdevice.h:3043 [inline]
neigh_hh_output include/net/neighbour.h:528 [inline]
neigh_output include/net/neighbour.h:542 [inline]
ip_finish_output2+0xcfc/0x1330 net/ipv4/ip_output.c:228
iptunnel_xmit+0x513/0x920 net/ipv4/ip_tunnel_core.c:82
ip_tunnel_xmit+0x1f87/0x2690 net/ipv4/ip_tunnel.c:858
__gre_xmit net/ipv4/ip_gre.c:474 [inline]
gre_tap_xmit+0x4eb/0x6e0 net/ipv4/ip_gre.c:751
__netdev_start_xmit include/linux/netdevice.h:4888 [inline]
netdev_start_xmit include/linux/netdevice.h:4902 [inline]
xmit_one net/core/dev.c:3627 [inline]
dev_hard_start_xmit+0x261/0x8c0 net/core/dev.c:3643
sch_direct_xmit+0x2b2/0x5e0 net/sched/sch_generic.c:342
__dev_xmit_skb net/core/dev.c:3864 [inline]
__dev_queue_xmit+0x1a7a/0x3d50 net/core/dev.c:4269
dev_queue_xmit include/linux/netdevice.h:3043 [inline]
bond_dev_queue_xmit+0x143/0x240 drivers/net/bonding/bond_main.c:307
__bond_start_xmit drivers/net/bonding/bond_main.c:5503 [inline]
bond_start_xmit+0xdb5/0x1d50 drivers/net/bonding/bond_main.c:5525
__netdev_start_xmit include/linux/netdevice.h:4888 [inline]
netdev_start_xmit include/linux/netdevice.h:4902 [inline]
xmit_one net/core/dev.c:3627 [inline]
dev_hard_start_xmit+0x261/0x8c0 net/core/dev.c:3643
__dev_queue_xmit+0x1b5d/0x3d50 net/core/dev.c:4303
neigh_output include/net/neighbour.h:544 [inline]
ip6_finish_output2+0xee6/0x15f0 net/ipv6/ip6_output.c:138
__ip6_finish_output net/ipv6/ip6_output.c:205 [inline]
ip6_finish_output+0x6a0/0xa80 net/ipv6/ip6_output.c:216
dst_output include/net/dst.h:444 [inline]
NF_HOOK include/linux/netfilter.h:302 [inline]
ndisc_send_skb+0xbab/0x14e0 net/ipv6/ndisc.c:511
addrconf_rs_timer+0x357/0x610 net/ipv6/addrconf.c:3982
call_timer_fn+0x1ad/0x6b0 kernel/time/timer.c:1504
expire_timers kernel/time/timer.c:1549 [inline]
__run_timers+0x67c/0x890 kernel/time/timer.c:1820
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1833
handle_softirqs+0x2ee/0xa40 kernel/softirq.c:571
__do_softirq kernel/softirq.c:605 [inline]
invoke_softirq kernel/softirq.c:445 [inline]
__irq_exit_rcu+0x157/0x240 kernel/softirq.c:654
irq_exit_rcu+0x5/0x20 kernel/softirq.c:666
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691
RIP: 0010:lockdep_unregister_key+0x562/0x600 kernel/locking/lockdep.c:6367
Code: 1f 91 48 c7 c6 e0 f2 6a 81 e8 aa b3 08 00 e8 e5 c7 08 00 e9 ea fb ff ff e8 7b d3 47 09 41 f7 c7 00 02 00 00 74 d0 fb 45 84 f6 <75> cf eb e0 0f 0b 45 31 f6 e9 64 ff ff ff 0f 0b e9 a5 fe ff ff 0f
RSP: 0018:ffffc9000361f8e0 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: 1ffff920006c3f24 RCX: ffffffff97355103
RDX: 0000000000000001 RSI: ffffffff8b0c1020 RDI: ffffffff8b5e67c0
RBP: ffffc9000361f9c0 R08: dffffc0000000000 R09: fffffbfff223feca
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffc9000361f920
R13: 1ffff920006c3f20 R14: 0000000000000000 R15: 0000000000000a06
__qdisc_destroy+0x127/0x450 net/sched/sch_generic.c:1078
netdev_for_each_tx_queue include/linux/netdevice.h:2465 [inline]
dev_shutdown+0x9d/0x440 net/sched/sch_generic.c:1489
unregister_netdevice_many+0xaac/0x17a0 net/core/dev.c:10938
unregister_netdevice_queue+0x2e6/0x350 net/core/dev.c:10878
unregister_netdevice include/linux/netdevice.h:3067 [inline]
__tun_detach+0x6b6/0x1600 drivers/net/tun.c:685
tun_detach drivers/net/tun.c:701 [inline]
tun_chr_close+0x104/0x1b0 drivers/net/tun.c:3492
__fput+0x3f6/0x8d0 fs/file_table.c:320
task_work_run+0x246/0x300 kernel/task_work.c:203
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:177
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f885b785d29
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:00007ffc285ca588 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007f885b977ba0 RCX: 00007f885b785d29
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f885b977ba0 R08: 0000000000000ddc R09: 00007ffc285ca87f
R10: 00000000003ff000 R11: 0000000000000246 R12: 00000000000423d0
R13: 00007f885b976080 R14: 0000000000000032 R15: ffffffffffffffff
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 91 xchg %eax,%ecx
1: 48 c7 c6 e0 f2 6a 81 mov $0xffffffff816af2e0,%rsi
8: e8 aa b3 08 00 call 0x8b3b7
d: e8 e5 c7 08 00 call 0x8c7f7
12: e9 ea fb ff ff jmp 0xfffffc01
17: e8 7b d3 47 09 call 0x947d397
1c: 41 f7 c7 00 02 00 00 test $0x200,%r15d
23: 74 d0 je 0xfffffff5
25: fb sti
26: 45 84 f6 test %r14b,%r14b
* 29: 75 cf jne 0xfffffffa <-- trapping instruction
2b: eb e0 jmp 0xd
2d: 0f 0b ud2
2f: 45 31 f6 xor %r14d,%r14d
32: e9 64 ff ff ff jmp 0xffffff9b
37: 0f 0b ud2
39: e9 a5 fe ff ff jmp 0xfffffee3
3e: 0f .byte 0xf