============================================ WARNING: possible recursive locking detected syzkaller #0 Tainted: G L -------------------------------------------- syz.7.6508/30146 is trying to acquire lock: ffff888043c53958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: spin_lock include/linux/spinlock.h:342 [inline] ffff888043c53958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: __netif_tx_lock include/linux/netdevice.h:4781 [inline] ffff888043c53958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: sch_direct_xmit+0x3b5/0xc60 net/sched/sch_generic.c:370 but task is already holding lock: ffff888043c53958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: spin_lock include/linux/spinlock.h:342 [inline] ffff888043c53958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: __netif_tx_lock include/linux/netdevice.h:4781 [inline] ffff888043c53958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: generic_xdp_tx+0x2d0/0x510 net/core/dev.c:5640 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&qdisc_xmit_lock_key#4); lock(&qdisc_xmit_lock_key#4); *** DEADLOCK *** May be due to missing lock nesting notation 8 locks held by syz.7.6508/30146: #0: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline] #0: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline] #0: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: tun_get_user+0xfdf/0x3c20 drivers/net/tun.c:1896 #1: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline] #1: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline] #1: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: netif_receive_skb_internal net/core/dev.c:6388 [inline] #1: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: netif_receive_skb+0xfa/0x7f0 net/core/dev.c:6460 #2: ffff888043c53958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: spin_lock include/linux/spinlock.h:342 [inline] #2: ffff888043c53958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: __netif_tx_lock include/linux/netdevice.h:4781 [inline] #2: ffff888043c53958 (&qdisc_xmit_lock_key#4){+.-.}-{3:3}, at: generic_xdp_tx+0x2d0/0x510 net/core/dev.c:5640 #3: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline] #3: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline] #3: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: icmp6_send+0x24d/0x3c60 net/ipv6/icmp.c:666 #4: ffff888022d05468 (k-slock-AF_INET6){+.-.}-{3:3}, at: spin_trylock include/linux/spinlock.h:354 [inline] #4: ffff888022d05468 (k-slock-AF_INET6){+.-.}-{3:3}, at: icmpv6_xmit_lock net/ipv6/icmp.c:108 [inline] #4: ffff888022d05468 (k-slock-AF_INET6){+.-.}-{3:3}, at: icmp6_send+0xdd9/0x3c60 net/ipv6/icmp.c:743 #5: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline] #5: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline] #5: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: ip6_send_skb+0xb9/0x430 net/ipv6/ip6_output.c:2017 #6: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline] #6: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline] #6: ffffffff8e7e5620 (rcu_read_lock){....}-{1:3}, at: ip6_output+0x135/0xa60 net/ipv6/ip6_output.c:234 #7: ffffffff8e7e55c0 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline] #7: ffffffff8e7e55c0 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:891 [inline] #7: ffffffff8e7e55c0 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x296/0x4950 net/core/dev.c:4791 stack backtrace: CPU: 1 UID: 0 PID: 30146 Comm: syz.7.6508 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_deadlock_bug.cold+0xbd/0xca kernel/locking/lockdep.c:3041 check_deadlock kernel/locking/lockdep.c:3093 [inline] validate_chain kernel/locking/lockdep.c:3895 [inline] __lock_acquire+0x12bb/0x2630 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1b1/0x370 kernel/locking/lockdep.c:5825 __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:4781 [inline] sch_direct_xmit+0x3b5/0xc60 net/sched/sch_generic.c:370 qdisc_restart net/sched/sch_generic.c:437 [inline] __qdisc_run+0x52d/0x1af0 net/sched/sch_generic.c:445 qdisc_run include/net/pkt_sched.h:120 [inline] qdisc_run include/net/pkt_sched.h:117 [inline] __dev_xmit_skb net/core/dev.c:4292 [inline] __dev_queue_xmit+0x30ed/0x4950 net/core/dev.c:4831 dev_queue_xmit include/linux/netdevice.h:3418 [inline] neigh_connected_output+0x3b7/0x5d0 net/core/neighbour.c:1648 neigh_output include/net/neighbour.h:560 [inline] ip6_finish_output2+0xb0f/0x1ce0 net/ipv6/ip6_output.c:136 __ip6_finish_output+0x357/0xdf0 net/ipv6/ip6_output.c:208 ip6_finish_output net/ipv6/ip6_output.c:219 [inline] NF_HOOK_COND include/linux/netfilter.h:307 [inline] ip6_output+0x2aa/0xa60 net/ipv6/ip6_output.c:246 dst_output include/net/dst.h:470 [inline] ip6_local_out+0xcb/0x1f0 net/ipv6/output_core.c:129 ip6_send_skb+0x112/0x430 net/ipv6/ip6_output.c:2018 ip6_push_pending_frames+0x3b/0x50 net/ipv6/ip6_output.c:2039 icmpv6_push_pending_frames+0x2c1/0x450 net/ipv6/icmp.c:311 icmp6_send+0x2197/0x3c60 net/ipv6/icmp.c:826 icmpv6_send include/linux/icmpv6.h:24 [inline] ip6_link_failure+0x31/0x580 net/ipv6/route.c:2862 dst_link_failure include/net/dst.h:438 [inline] vti6_xmit net/ipv6/ip6_vti.c:542 [inline] vti6_tnl_xmit+0xd3f/0x1fe0 net/ipv6/ip6_vti.c:580 __netdev_start_xmit include/linux/netdevice.h:5368 [inline] netdev_start_xmit include/linux/netdevice.h:5377 [inline] generic_xdp_tx+0x199/0x510 net/core/dev.c:5642 dev_map_generic_redirect+0x4cd/0x610 kernel/bpf/devmap.c:717 dev_map_redirect_multi+0x3a3/0xa10 kernel/bpf/devmap.c:811 xdp_do_generic_redirect_map net/core/filter.c:4574 [inline] xdp_do_generic_redirect+0x69a/0x820 net/core/filter.c:4637 do_xdp_generic+0x9ec/0x12c0 net/core/dev.c:5670 __netif_receive_skb_core.constprop.0+0x836/0x3530 net/core/dev.c:6012 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:6200 __netif_receive_skb+0x1f/0x120 net/core/dev.c:6315 netif_receive_skb_internal net/core/dev.c:6401 [inline] netif_receive_skb+0x13b/0x7f0 net/core/dev.c:6460 tun_rx_batched.isra.0+0x3f6/0x750 drivers/net/tun.c:1511 tun_get_user+0x1e31/0x3c20 drivers/net/tun.c:1955 tun_chr_write_iter+0xdc/0x200 drivers/net/tun.c:2001 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6ac/0x1070 fs/read_write.c:688 ksys_write+0x12a/0x250 fs/read_write.c:740 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x10b/0x860 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbc9ed5d68e Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08 RSP: 002b:00007fbc9fd02fb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fbc9fd036c0 RCX: 00007fbc9ed5d68e RDX: 000000000000004a RSI: 0000200000000080 RDI: 00000000000000c8 RBP: 00007fbc9ee32d6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fbc9f016038 R14: 00007fbc9f015fa0 R15: 00007fff3e473dc8