====================================================== WARNING: possible circular locking dependency detected 4.19.207-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/22276 is trying to acquire lock: 0000000080f8e3fd (_xmit_TUNNEL6#2){+.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] 0000000080f8e3fd (_xmit_TUNNEL6#2){+.-.}, at: __netif_tx_lock include/linux/netdevice.h:3842 [inline] 0000000080f8e3fd (_xmit_TUNNEL6#2){+.-.}, at: sch_direct_xmit+0x254/0xf70 net/sched/sch_generic.c:330 but task is already holding lock: 0000000099eddfed (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}, at: spin_lock include/linux/spinlock.h:329 [inline] 0000000099eddfed (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}, at: __dev_xmit_skb net/core/dev.c:3467 [inline] 0000000099eddfed (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}, at: __dev_queue_xmit+0x2889/0x2e00 net/core/dev.c:3807 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}: spin_lock include/linux/spinlock.h:329 [inline] __dev_xmit_skb net/core/dev.c:3467 [inline] __dev_queue_xmit+0x2889/0x2e00 net/core/dev.c:3807 neigh_output include/net/neighbour.h:501 [inline] ip6_finish_output2+0x113d/0x2290 net/ipv6/ip6_output.c:120 ip6_finish_output+0x89b/0x10f0 net/ipv6/ip6_output.c:192 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x205/0x770 net/ipv6/ip6_output.c:209 dst_output include/net/dst.h:455 [inline] ip6_local_out+0xaf/0x170 net/ipv6/output_core.c:160 ip6_send_skb+0xb3/0x300 net/ipv6/ip6_output.c:1741 ip6_push_pending_frames+0xbd/0xe0 net/ipv6/ip6_output.c:1761 icmpv6_push_pending_frames+0x294/0x470 net/ipv6/icmp.c:288 icmp6_send+0x1c0f/0x22c0 net/ipv6/icmp.c:584 __icmpv6_send include/linux/icmpv6.h:28 [inline] icmpv6_send include/linux/icmpv6.h:49 [inline] ip6_link_failure+0x2d/0x4f0 net/ipv6/route.c:2297 dst_link_failure include/net/dst.h:438 [inline] vti6_xmit net/ipv6/ip6_vti.c:540 [inline] vti6_tnl_xmit+0x8fb/0x1c80 net/ipv6/ip6_vti.c:579 __netdev_start_xmit include/linux/netdevice.h:4349 [inline] netdev_start_xmit include/linux/netdevice.h:4363 [inline] xmit_one net/core/dev.c:3256 [inline] dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272 sch_direct_xmit+0x2d6/0xf70 net/sched/sch_generic.c:332 __dev_xmit_skb net/core/dev.c:3483 [inline] __dev_queue_xmit+0x1a66/0x2e00 net/core/dev.c:3807 neigh_output include/net/neighbour.h:501 [inline] ip6_finish_output2+0x113d/0x2290 net/ipv6/ip6_output.c:120 ip6_finish_output+0x89b/0x10f0 net/ipv6/ip6_output.c:192 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x205/0x770 net/ipv6/ip6_output.c:209 dst_output include/net/dst.h:455 [inline] ip6_local_out+0xaf/0x170 net/ipv6/output_core.c:160 ip6_send_skb+0xb3/0x300 net/ipv6/ip6_output.c:1741 ip6_push_pending_frames+0xbd/0xe0 net/ipv6/ip6_output.c:1761 rawv6_push_pending_frames net/ipv6/raw.c:618 [inline] rawv6_sendmsg+0x2a81/0x36a0 net/ipv6/raw.c:959 inet_sendmsg+0x132/0x5a0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x3b3/0x8e0 net/socket.c:2227 __sys_sendmmsg+0x195/0x470 net/socket.c:2322 __do_sys_sendmmsg net/socket.c:2351 [inline] __se_sys_sendmmsg net/socket.c:2348 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2348 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (_xmit_TUNNEL6#2){+.-.}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] __netif_tx_lock include/linux/netdevice.h:3842 [inline] sch_direct_xmit+0x254/0xf70 net/sched/sch_generic.c:330 __dev_xmit_skb net/core/dev.c:3483 [inline] __dev_queue_xmit+0x1a66/0x2e00 net/core/dev.c:3807 neigh_output include/net/neighbour.h:501 [inline] ip6_finish_output2+0x113d/0x2290 net/ipv6/ip6_output.c:120 ip6_finish_output+0x89b/0x10f0 net/ipv6/ip6_output.c:192 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x205/0x770 net/ipv6/ip6_output.c:209 dst_output include/net/dst.h:455 [inline] ip6_local_out+0xaf/0x170 net/ipv6/output_core.c:160 ip6_send_skb+0xb3/0x300 net/ipv6/ip6_output.c:1741 ip6_push_pending_frames+0xbd/0xe0 net/ipv6/ip6_output.c:1761 rawv6_push_pending_frames net/ipv6/raw.c:618 [inline] rawv6_sendmsg+0x2a81/0x36a0 net/ipv6/raw.c:959 inet_sendmsg+0x132/0x5a0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x3b3/0x8e0 net/socket.c:2227 __sys_sendmmsg+0x195/0x470 net/socket.c:2322 __do_sys_sendmmsg net/socket.c:2351 [inline] __se_sys_sendmmsg net/socket.c:2348 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2348 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe 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 *** 5 locks held by syz-executor.2/22276: #0: 00000000a2840f2c (sk_lock-AF_INET6){+.+.}, at: lock_sock include/net/sock.h:1510 [inline] #0: 00000000a2840f2c (sk_lock-AF_INET6){+.+.}, at: rawv6_sendmsg+0x13e8/0x36a0 net/ipv6/raw.c:951 #1: 000000009a7d4d35 (rcu_read_lock_bh){....}, at: lwtunnel_xmit_redirect include/net/lwtunnel.h:92 [inline] #1: 000000009a7d4d35 (rcu_read_lock_bh){....}, at: ip6_finish_output2+0x1f2/0x2290 net/ipv6/ip6_output.c:106 #2: 000000009a7d4d35 (rcu_read_lock_bh){....}, at: __dev_queue_xmit+0x1e2/0x2e00 net/core/dev.c:3773 #3: 0000000099eddfed (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}, at: spin_lock include/linux/spinlock.h:329 [inline] #3: 0000000099eddfed (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}, at: __dev_xmit_skb net/core/dev.c:3467 [inline] #3: 0000000099eddfed (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}, at: __dev_queue_xmit+0x2889/0x2e00 net/core/dev.c:3807 #4: 00000000a8ba031f (dev->qdisc_running_key ?: &qdisc_running_key){+...}, at: neigh_output include/net/neighbour.h:501 [inline] #4: 00000000a8ba031f (dev->qdisc_running_key ?: &qdisc_running_key){+...}, at: ip6_finish_output2+0x113d/0x2290 net/ipv6/ip6_output.c:120 stack backtrace: CPU: 0 PID: 22276 Comm: syz-executor.2 Not tainted 4.19.207-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2420 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] __netif_tx_lock include/linux/netdevice.h:3842 [inline] sch_direct_xmit+0x254/0xf70 net/sched/sch_generic.c:330 __dev_xmit_skb net/core/dev.c:3483 [inline] __dev_queue_xmit+0x1a66/0x2e00 net/core/dev.c:3807 neigh_output include/net/neighbour.h:501 [inline] ip6_finish_output2+0x113d/0x2290 net/ipv6/ip6_output.c:120 ip6_finish_output+0x89b/0x10f0 net/ipv6/ip6_output.c:192 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x205/0x770 net/ipv6/ip6_output.c:209 dst_output include/net/dst.h:455 [inline] ip6_local_out+0xaf/0x170 net/ipv6/output_core.c:160 ip6_send_skb+0xb3/0x300 net/ipv6/ip6_output.c:1741 ip6_push_pending_frames+0xbd/0xe0 net/ipv6/ip6_output.c:1761 rawv6_push_pending_frames net/ipv6/raw.c:618 [inline] rawv6_sendmsg+0x2a81/0x36a0 net/ipv6/raw.c:959 inet_sendmsg+0x132/0x5a0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x3b3/0x8e0 net/socket.c:2227 __sys_sendmmsg+0x195/0x470 net/socket.c:2322 __do_sys_sendmmsg net/socket.c:2351 [inline] __se_sys_sendmmsg net/socket.c:2348 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2348 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f636a3d2709 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:00007f6367928188 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f636a4d7020 RCX: 00007f636a3d2709 RDX: 03fffffffffffe9f RSI: 00000000200092c0 RDI: 0000000000000005 RBP: 00007f636a42ccb4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000002000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc00396bef R14: 00007f6367928300 R15: 0000000000022000