====================================================== WARNING: possible circular locking dependency detected 5.15.0-rc6-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.4/20604 is trying to acquire lock: ffff88807be4c898 (_xmit_TUNNEL6#2){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] ffff88807be4c898 (_xmit_TUNNEL6#2){+.-.}-{2:2}, at: __netif_tx_lock include/linux/netdevice.h:4405 [inline] ffff88807be4c898 (_xmit_TUNNEL6#2){+.-.}-{2:2}, at: sch_direct_xmit+0x30f/0xbc0 net/sched/sch_generic.c:340 but task is already holding lock: ffff888076aeca18 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] ffff888076aeca18 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: __dev_xmit_skb net/core/dev.c:3834 [inline] ffff888076aeca18 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: __dev_queue_xmit+0x2d5d/0x36e0 net/core/dev.c:4177 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] __dev_xmit_skb net/core/dev.c:3834 [inline] __dev_queue_xmit+0x2d5d/0x36e0 net/core/dev.c:4177 neigh_connected_output+0x3b6/0x510 net/core/neighbour.c:1521 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x717/0x1500 net/ipv6/ip6_output.c:126 __ip6_finish_output net/ipv6/ip6_output.c:191 [inline] __ip6_finish_output+0x4c1/0x1050 net/ipv6/ip6_output.c:170 ip6_finish_output+0x32/0x200 net/ipv6/ip6_output.c:201 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x1e4/0x530 net/ipv6/ip6_output.c:224 dst_output include/net/dst.h:450 [inline] ip6_local_out+0xaf/0x1a0 net/ipv6/output_core.c:161 ip6_send_skb+0xb7/0x340 net/ipv6/ip6_output.c:1912 ip6_push_pending_frames+0xdd/0x100 net/ipv6/ip6_output.c:1932 icmpv6_push_pending_frames+0x294/0x470 net/ipv6/icmp.c:310 icmp6_send+0x1d58/0x2670 net/ipv6/icmp.c:626 __icmpv6_send include/linux/icmpv6.h:28 [inline] icmpv6_send include/linux/icmpv6.h:49 [inline] ip6_link_failure+0x2d/0x520 net/ipv6/route.c:2790 dst_link_failure include/net/dst.h:429 [inline] vti6_xmit net/ipv6/ip6_vti.c:548 [inline] vti6_tnl_xmit+0xeb7/0x1fe0 net/ipv6/ip6_vti.c:587 __netdev_start_xmit include/linux/netdevice.h:4988 [inline] netdev_start_xmit include/linux/netdevice.h:5002 [inline] xmit_one net/core/dev.c:3582 [inline] dev_hard_start_xmit+0x1eb/0x920 net/core/dev.c:3598 sch_direct_xmit+0x19f/0xbc0 net/sched/sch_generic.c:342 __dev_xmit_skb net/core/dev.c:3850 [inline] __dev_queue_xmit+0x275a/0x36e0 net/core/dev.c:4177 neigh_connected_output+0x3b6/0x510 net/core/neighbour.c:1521 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x717/0x1500 net/ipv6/ip6_output.c:126 __ip6_finish_output net/ipv6/ip6_output.c:191 [inline] __ip6_finish_output+0x4c1/0x1050 net/ipv6/ip6_output.c:170 ip6_finish_output+0x32/0x200 net/ipv6/ip6_output.c:201 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x1e4/0x530 net/ipv6/ip6_output.c:224 dst_output include/net/dst.h:450 [inline] ip6_local_out+0xaf/0x1a0 net/ipv6/output_core.c:161 ip6_send_skb+0xb7/0x340 net/ipv6/ip6_output.c:1912 udp_v6_send_skb+0x7c3/0x15e0 net/ipv6/udp.c:1249 udpv6_sendmsg+0x2319/0x2c40 net/ipv6/udp.c:1547 inet6_sendmsg+0x99/0xe0 net/ipv6/af_inet6.c:643 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 ____sys_sendmsg+0x331/0x810 net/socket.c:2409 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463 __sys_sendmmsg+0x195/0x470 net/socket.c:2549 __do_sys_sendmmsg net/socket.c:2578 [inline] __se_sys_sendmmsg net/socket.c:2575 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2575 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #0 (_xmit_TUNNEL6#2){+.-.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3051 [inline] check_prevs_add kernel/locking/lockdep.c:3174 [inline] validate_chain kernel/locking/lockdep.c:3789 [inline] __lock_acquire+0x2a07/0x54a0 kernel/locking/lockdep.c:5015 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] __netif_tx_lock include/linux/netdevice.h:4405 [inline] sch_direct_xmit+0x30f/0xbc0 net/sched/sch_generic.c:340 __dev_xmit_skb net/core/dev.c:3850 [inline] __dev_queue_xmit+0x275a/0x36e0 net/core/dev.c:4177 neigh_connected_output+0x3b6/0x510 net/core/neighbour.c:1521 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x717/0x1500 net/ipv6/ip6_output.c:126 __ip6_finish_output net/ipv6/ip6_output.c:191 [inline] __ip6_finish_output+0x4c1/0x1050 net/ipv6/ip6_output.c:170 ip6_finish_output+0x32/0x200 net/ipv6/ip6_output.c:201 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x1e4/0x530 net/ipv6/ip6_output.c:224 dst_output include/net/dst.h:450 [inline] ip6_local_out+0xaf/0x1a0 net/ipv6/output_core.c:161 ip6_send_skb+0xb7/0x340 net/ipv6/ip6_output.c:1912 udp_v6_send_skb+0x7c3/0x15e0 net/ipv6/udp.c:1249 udpv6_sendmsg+0x2319/0x2c40 net/ipv6/udp.c:1547 inet6_sendmsg+0x99/0xe0 net/ipv6/af_inet6.c:643 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 ____sys_sendmsg+0x331/0x810 net/socket.c:2409 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463 __sys_sendmmsg+0x195/0x470 net/socket.c:2549 __do_sys_sendmmsg net/socket.c:2578 [inline] __se_sys_sendmmsg net/socket.c:2575 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2575 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(dev->qdisc_tx_busylock ?: &qdisc_tx_busylock); lock(_xmit_TUNNEL6#2); lock(dev->qdisc_tx_busylock ?: &qdisc_tx_busylock); lock(_xmit_TUNNEL6#2); *** DEADLOCK *** 4 locks held by syz-executor.4/20604: #0: ffffffff8b981ac0 (rcu_read_lock_bh){....}-{1:2}, at: lwtunnel_xmit_redirect include/net/lwtunnel.h:95 [inline] #0: ffffffff8b981ac0 (rcu_read_lock_bh){....}-{1:2}, at: ip6_finish_output2+0x2ad/0x1500 net/ipv6/ip6_output.c:112 #1: ffffffff8b981ac0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1d5/0x36e0 net/core/dev.c:4143 #2: ffff888076aeca18 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: spin_lock include/linux/spinlock.h:363 [inline] #2: ffff888076aeca18 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: __dev_xmit_skb net/core/dev.c:3834 [inline] #2: ffff888076aeca18 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: __dev_queue_xmit+0x2d5d/0x36e0 net/core/dev.c:4177 #3: ffff888076aec948 (dev->qdisc_running_key ?: &qdisc_running_key#2){+..-}-{0:0}, at: neigh_connected_output+0x3b6/0x510 net/core/neighbour.c:1521 stack backtrace: CPU: 0 PID: 20604 Comm: syz-executor.4 Not tainted 5.15.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2131 check_prev_add kernel/locking/lockdep.c:3051 [inline] check_prevs_add kernel/locking/lockdep.c:3174 [inline] validate_chain kernel/locking/lockdep.c:3789 [inline] __lock_acquire+0x2a07/0x54a0 kernel/locking/lockdep.c:5015 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:363 [inline] __netif_tx_lock include/linux/netdevice.h:4405 [inline] sch_direct_xmit+0x30f/0xbc0 net/sched/sch_generic.c:340 __dev_xmit_skb net/core/dev.c:3850 [inline] __dev_queue_xmit+0x275a/0x36e0 net/core/dev.c:4177 neigh_connected_output+0x3b6/0x510 net/core/neighbour.c:1521 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x717/0x1500 net/ipv6/ip6_output.c:126 __ip6_finish_output net/ipv6/ip6_output.c:191 [inline] __ip6_finish_output+0x4c1/0x1050 net/ipv6/ip6_output.c:170 ip6_finish_output+0x32/0x200 net/ipv6/ip6_output.c:201 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x1e4/0x530 net/ipv6/ip6_output.c:224 dst_output include/net/dst.h:450 [inline] ip6_local_out+0xaf/0x1a0 net/ipv6/output_core.c:161 ip6_send_skb+0xb7/0x340 net/ipv6/ip6_output.c:1912 udp_v6_send_skb+0x7c3/0x15e0 net/ipv6/udp.c:1249 udpv6_sendmsg+0x2319/0x2c40 net/ipv6/udp.c:1547 inet6_sendmsg+0x99/0xe0 net/ipv6/af_inet6.c:643 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 ____sys_sendmsg+0x331/0x810 net/socket.c:2409 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463 __sys_sendmmsg+0x195/0x470 net/socket.c:2549 __do_sys_sendmmsg net/socket.c:2578 [inline] __se_sys_sendmmsg net/socket.c:2575 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2575 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f4421a66a39 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f441efdc188 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f4421b79f60 RCX: 00007f4421a66a39 RDX: 00000000000004ff RSI: 00000000200092c0 RDI: 0000000000000005 RBP: 00007f4421ac0e8f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc54567dff R14: 00007f441efdc300 R15: 0000000000022000