============================================ WARNING: possible recursive locking detected 4.19.211-syzkaller #0 Not tainted -------------------------------------------- syz-executor.3/28513 is trying to acquire lock: 0000000013697215 (_xmit_ETHER#2){+.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] 0000000013697215 (_xmit_ETHER#2){+.-.}, at: __netif_tx_lock include/linux/netdevice.h:3842 [inline] 0000000013697215 (_xmit_ETHER#2){+.-.}, at: sch_direct_xmit+0x254/0xf70 net/sched/sch_generic.c:330 but task is already holding lock: 0000000048b58ded (_xmit_ETHER#2){+.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] 0000000048b58ded (_xmit_ETHER#2){+.-.}, at: __netif_tx_lock include/linux/netdevice.h:3842 [inline] 0000000048b58ded (_xmit_ETHER#2){+.-.}, at: sch_direct_xmit+0x254/0xf70 net/sched/sch_generic.c:330 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(_xmit_ETHER#2); lock(_xmit_ETHER#2); *** DEADLOCK *** May be due to missing lock nesting notation 11 locks held by syz-executor.3/28513: #0: 00000000c1ad32e2 (rcu_read_lock){....}, at: bpf_test_run+0x1dd/0x440 net/bpf/test_run.c:42 #1: 00000000e8ff86b9 (rcu_read_lock_bh){....}, at: __dev_queue_xmit+0x1e2/0x2e00 net/core/dev.c:3773 #2: 00000000e8ff86b9 (rcu_read_lock_bh){....}, at: lwtunnel_xmit_redirect include/net/lwtunnel.h:92 [inline] #2: 00000000e8ff86b9 (rcu_read_lock_bh){....}, at: ip_finish_output2+0x28d/0x15a0 net/ipv4/ip_output.c:214 #3: 00000000e8ff86b9 (rcu_read_lock_bh){....}, at: __dev_queue_xmit+0x1e2/0x2e00 net/core/dev.c:3773 #4: 000000006810e229 (&(&sch->seqlock)->rlock){+...}, at: spin_trylock include/linux/spinlock.h:339 [inline] #4: 000000006810e229 (&(&sch->seqlock)->rlock){+...}, at: qdisc_run_begin include/net/sch_generic.h:130 [inline] #4: 000000006810e229 (&(&sch->seqlock)->rlock){+...}, at: qdisc_run include/net/pkt_sched.h:119 [inline] #4: 000000006810e229 (&(&sch->seqlock)->rlock){+...}, at: __dev_xmit_skb net/core/dev.c:3451 [inline] #4: 000000006810e229 (&(&sch->seqlock)->rlock){+...}, at: __dev_queue_xmit+0x278b/0x2e00 net/core/dev.c:3807 #5: 00000000ec990d95 (dev->qdisc_running_key ?: &qdisc_running_key){+...}, at: neigh_resolve_output+0x55a/0x910 net/core/neighbour.c:1374 #6: 0000000048b58ded (_xmit_ETHER#2){+.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] #6: 0000000048b58ded (_xmit_ETHER#2){+.-.}, at: __netif_tx_lock include/linux/netdevice.h:3842 [inline] #6: 0000000048b58ded (_xmit_ETHER#2){+.-.}, at: sch_direct_xmit+0x254/0xf70 net/sched/sch_generic.c:330 #7: 00000000e8ff86b9 (rcu_read_lock_bh){....}, at: lwtunnel_xmit_redirect include/net/lwtunnel.h:92 [inline] #7: 00000000e8ff86b9 (rcu_read_lock_bh){....}, at: ip_finish_output2+0x28d/0x15a0 net/ipv4/ip_output.c:214 #8: 00000000e8ff86b9 (rcu_read_lock_bh){....}, at: __dev_queue_xmit+0x1e2/0x2e00 net/core/dev.c:3773 #9: 000000005ce771a4 (&(&sch->seqlock)->rlock){+...}, at: spin_trylock include/linux/spinlock.h:339 [inline] #9: 000000005ce771a4 (&(&sch->seqlock)->rlock){+...}, at: qdisc_run_begin include/net/sch_generic.h:130 [inline] #9: 000000005ce771a4 (&(&sch->seqlock)->rlock){+...}, at: qdisc_run include/net/pkt_sched.h:119 [inline] #9: 000000005ce771a4 (&(&sch->seqlock)->rlock){+...}, at: __dev_xmit_skb net/core/dev.c:3451 [inline] #9: 000000005ce771a4 (&(&sch->seqlock)->rlock){+...}, at: __dev_queue_xmit+0x278b/0x2e00 net/core/dev.c:3807 #10: 0000000099468429 (dev->qdisc_running_key ?: &qdisc_running_key){+...}, at: neigh_resolve_output+0x55a/0x910 net/core/neighbour.c:1374 stack backtrace: CPU: 0 PID: 28513 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:1764 [inline] check_deadlock kernel/locking/lockdep.c:1808 [inline] validate_chain kernel/locking/lockdep.c:2404 [inline] __lock_acquire.cold+0x121/0x57e 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 qdisc_restart net/sched/sch_generic.c:395 [inline] __qdisc_run+0x4d0/0x1640 net/sched/sch_generic.c:403 qdisc_run include/net/pkt_sched.h:120 [inline] __dev_xmit_skb net/core/dev.c:3451 [inline] __dev_queue_xmit+0x2102/0x2e00 net/core/dev.c:3807 neigh_resolve_output+0x55a/0x910 net/core/neighbour.c:1374 neigh_output include/net/neighbour.h:501 [inline] ip_finish_output2+0xd76/0x15a0 net/ipv4/ip_output.c:230 ip_finish_output+0xae9/0x10b0 net/ipv4/ip_output.c:318 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip_output+0x203/0x5f0 net/ipv4/ip_output.c:406 dst_output include/net/dst.h:455 [inline] ip_local_out+0xaf/0x170 net/ipv4/ip_output.c:125 iptunnel_xmit+0x63b/0x9d0 net/ipv4/ip_tunnel_core.c:91 ip_tunnel_xmit+0x13ad/0x3850 net/ipv4/ip_tunnel.c:790 erspan_xmit+0xd6e/0x27e0 net/ipv4/ip_gre.c:759 __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 qdisc_restart net/sched/sch_generic.c:395 [inline] __qdisc_run+0x4d0/0x1640 net/sched/sch_generic.c:403 qdisc_run include/net/pkt_sched.h:120 [inline] __dev_xmit_skb net/core/dev.c:3451 [inline] __dev_queue_xmit+0x2102/0x2e00 net/core/dev.c:3807 neigh_resolve_output+0x55a/0x910 net/core/neighbour.c:1374 neigh_output include/net/neighbour.h:501 [inline] ip_finish_output2+0xd76/0x15a0 net/ipv4/ip_output.c:230 ip_finish_output+0xae9/0x10b0 net/ipv4/ip_output.c:318 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip_output+0x203/0x5f0 net/ipv4/ip_output.c:406 dst_output include/net/dst.h:455 [inline] ip_local_out+0xaf/0x170 net/ipv4/ip_output.c:125 iptunnel_xmit+0x63b/0x9d0 net/ipv4/ip_tunnel_core.c:91 ip_tunnel_xmit+0x13ad/0x3850 net/ipv4/ip_tunnel.c:790 ipgre_xmit+0x5b3/0x920 net/ipv4/ip_gre.c:708 __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 __dev_queue_xmit+0x269d/0x2e00 net/core/dev.c:3838 __bpf_tx_skb net/core/filter.c:2015 [inline] __bpf_redirect_common net/core/filter.c:2054 [inline] __bpf_redirect+0x746/0xbc0 net/core/filter.c:2061 ____bpf_clone_redirect net/core/filter.c:2094 [inline] bpf_clone_redirect+0x2c0/0x430 net/core/filter.c:2066 ___bpf_prog_run+0x1bfa/0x4e80 kernel/bpf/core.c:1184 syz-executor.3 (28513) used greatest stack depth: 21528 bytes left IPVS: ftp: loaded support on port[0] = 21