====================================================== [ INFO: possible circular locking dependency detected ] 4.4.174+ #17 Not tainted ------------------------------------------------------- syz-executor.1/6528 is trying to acquire lock: (_xmit_NETROM){+.-...}, at: [] spin_lock include/linux/spinlock.h:302 [inline] (_xmit_NETROM){+.-...}, at: [] __netif_tx_lock include/linux/netdevice.h:3306 [inline] (_xmit_NETROM){+.-...}, at: [] sch_direct_xmit+0x238/0x700 net/sched/sch_generic.c:163 but task is already holding lock: (&(&q->lock)->rlock){+.-...}, at: [] spin_lock include/linux/spinlock.h:302 [inline] (&(&q->lock)->rlock){+.-...}, at: [] ipv6_frag_rcv+0x6cc/0x51e0 net/ipv6/reassembly.c:528 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:112 [inline] [] _raw_spin_lock_irqsave+0x50/0x70 kernel/locking/spinlock.c:159 [] try_to_wake_up+0x2b/0x1110 kernel/sched/core.c:1974 [] wake_up_process+0x15/0x20 kernel/sched/core.c:2142 [] send_mayday kernel/workqueue.c:1853 [inline] [] pool_mayday_timeout+0x3b2/0x4e0 kernel/workqueue.c:1873 [] call_timer_fn+0x18d/0x850 kernel/time/timer.c:1185 [] __run_timers kernel/time/timer.c:1261 [inline] [] run_timer_softirq+0x51f/0xb70 kernel/time/timer.c:1444 [] __do_softirq+0x226/0xa3f kernel/softirq.c:273 [] invoke_softirq kernel/softirq.c:350 [inline] [] irq_exit+0x10a/0x150 kernel/softirq.c:391 [] exiting_irq arch/x86/include/asm/apic.h:652 [inline] [] smp_apic_timer_interrupt+0x7e/0xb0 arch/x86/kernel/apic/apic.c:926 [] apic_timer_interrupt+0x9d/0xb0 arch/x86/entry/entry_64.S:768 [] pipe_read+0x274/0x860 fs/pipe.c:270 [] new_sync_read fs/read_write.c:424 [inline] [] __vfs_read+0x2e5/0x3c0 fs/read_write.c:436 [] vfs_read+0x134/0x360 fs/read_write.c:456 [] SYSC_read fs/read_write.c:571 [inline] [] SyS_read+0xdc/0x1c0 fs/read_write.c:564 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x37d6/0x4f50 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __raw_spin_lock include/linux/spinlock_api_smp.h:144 [inline] [] _raw_spin_lock+0x38/0x50 kernel/locking/spinlock.c:151 [] spin_lock include/linux/spinlock.h:302 [inline] [] __netif_tx_lock include/linux/netdevice.h:3306 [inline] [] sch_direct_xmit+0x238/0x700 net/sched/sch_generic.c:163 [] __dev_xmit_skb net/core/dev.c:2979 [inline] [] __dev_queue_xmit+0xd24/0x1bb0 net/core/dev.c:3197 [] dev_queue_xmit+0x18/0x20 net/core/dev.c:3263 [] neigh_resolve_output+0x4a0/0x7a0 net/core/neighbour.c:1329 [] dst_neigh_output include/net/dst.h:461 [inline] [] ip6_finish_output2+0x9c7/0x1dc0 net/ipv6/ip6_output.c:113 [] ip6_finish_output+0x2f3/0x750 net/ipv6/ip6_output.c:131 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip6_output+0x1b4/0x520 net/ipv6/ip6_output.c:145 [] dst_output include/net/dst.h:498 [inline] [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ndisc_send_skb+0x98d/0x1110 net/ipv6/ndisc.c:471 [] ndisc_send_ns+0x4bf/0x6b0 net/ipv6/ndisc.c:595 [] ndisc_solicit+0x2b2/0x440 net/ipv6/ndisc.c:686 [] neigh_probe+0xc8/0x100 net/core/neighbour.c:871 [] __neigh_event_send+0x2ab/0xc50 net/core/neighbour.c:1027 [] neigh_event_send include/net/neighbour.h:431 [inline] [] neigh_resolve_output+0x5ec/0x7a0 net/core/neighbour.c:1313 [] dst_neigh_output include/net/dst.h:461 [inline] [] ip6_finish_output2+0x9c7/0x1dc0 net/ipv6/ip6_output.c:113 [] ip6_finish_output+0x2f3/0x750 net/ipv6/ip6_output.c:131 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip6_output+0x1b4/0x520 net/ipv6/ip6_output.c:145 [] dst_output include/net/dst.h:498 [inline] [] ip6_local_out+0x9c/0x180 net/ipv6/output_core.c:169 [] ip6_send_skb+0xa2/0x340 net/ipv6/ip6_output.c:1725 [] ip6_push_pending_frames+0xbb/0xe0 net/ipv6/ip6_output.c:1745 [] icmpv6_push_pending_frames+0x336/0x530 net/ipv6/icmp.c:276 [] icmp6_send+0x1506/0x1b40 net/ipv6/icmp.c:537 [] icmpv6_param_prob+0x29/0x40 net/ipv6/icmp.c:551 [] ip6_frag_queue net/ipv6/reassembly.c:225 [inline] [] ipv6_frag_rcv+0x3f06/0x51e0 net/ipv6/reassembly.c:531 [] ip6_input_finish+0x57d/0x14f0 net/ipv6/ip6_input.c:248 [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ip6_input+0xf8/0x1f0 net/ipv6/ip6_input.c:280 [] dst_input include/net/dst.h:504 [inline] [] ip6_rcv_finish+0x14d/0x670 net/ipv6/ip6_input.c:62 [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ipv6_rcv+0xfc1/0x1a20 net/ipv6/ip6_input.c:186 [] __netif_receive_skb_core+0x1300/0x2950 net/core/dev.c:4041 [] __netif_receive_skb+0x58/0x1c0 net/core/dev.c:4076 [] process_backlog+0x200/0x630 net/core/dev.c:4673 [] napi_poll net/core/dev.c:4911 [inline] [] net_rx_action+0x367/0xd30 net/core/dev.c:4976 [] __do_softirq+0x226/0xa3f kernel/softirq.c:273 [] do_softirq_own_stack+0x1c/0x30 arch/x86/entry/entry_64.S:956 [] do_softirq.part.0+0x54/0x60 kernel/softirq.c:317 [] do_softirq+0x18/0x20 kernel/softirq.c:305 [] netif_rx_ni+0xeb/0x3b0 net/core/dev.c:3675 [] tun_get_user+0xdbf/0x2640 drivers/net/tun.c:1264 [] tun_chr_write_iter+0xda/0x190 drivers/net/tun.c:1283 [] do_iter_readv_writev+0x141/0x1e0 fs/read_write.c:666 [] compat_do_readv_writev+0x389/0x6e0 fs/read_write.c:984 [] compat_writev+0xe1/0x150 fs/read_write.c:1092 [] C_SYSC_writev fs/read_write.c:1112 [inline] [] compat_SyS_writev+0xdb/0x1c0 fs/read_write.c:1101 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&q->lock)->rlock); lock(_xmit_NETROM); lock(&(&q->lock)->rlock); lock(_xmit_NETROM); *** DEADLOCK *** 9 locks held by syz-executor.1/6528: #0: (rcu_read_lock){......}, at: [] __skb_unlink include/linux/skbuff.h:1648 [inline] #0: (rcu_read_lock){......}, at: [] __skb_dequeue include/linux/skbuff.h:1664 [inline] #0: (rcu_read_lock){......}, at: [] process_backlog+0x19c/0x630 net/core/dev.c:4670 #1: (rcu_read_lock){......}, at: [] ip6_input_finish+0x0/0x14f0 net/ipv6/ip6_input.c:55 #2: (&(&q->lock)->rlock){+.-...}, at: [] spin_lock include/linux/spinlock.h:302 [inline] #2: (&(&q->lock)->rlock){+.-...}, at: [] ipv6_frag_rcv+0x6cc/0x51e0 net/ipv6/reassembly.c:528 #3: (slock-AF_INET6){+.-...}, at: [] spin_trylock include/linux/spinlock.h:312 [inline] #3: (slock-AF_INET6){+.-...}, at: [] icmpv6_xmit_lock net/ipv6/icmp.c:120 [inline] #3: (slock-AF_INET6){+.-...}, at: [] icmp6_send+0x7bd/0x1b40 net/ipv6/icmp.c:485 #4: (rcu_read_lock){......}, at: [] icmp6_send+0xf44/0x1b40 net/ipv6/icmp.c:517 #5: (rcu_read_lock_bh){......}, at: [] ip6_finish_output2+0x1e1/0x1dc0 net/ipv6/ip6_output.c:71 #6: (rcu_read_lock){......}, at: [] ip6_nd_hdr net/ipv6/ndisc.c:427 [inline] #6: (rcu_read_lock){......}, at: [] ndisc_send_skb+0x779/0x1110 net/ipv6/ndisc.c:465 #7: (rcu_read_lock_bh){......}, at: [] ip6_finish_output2+0x1e1/0x1dc0 net/ipv6/ip6_output.c:71 #8: (rcu_read_lock_bh){......}, at: [] __dev_queue_xmit+0x1d7/0x1bb0 net/core/dev.c:3161 stack backtrace: CPU: 0 PID: 6528 Comm: syz-executor.1 Not tainted 4.4.174+ #17 0000000000000000 47dbfe97b193e8c9 ffff8801db6064e0 ffffffff81aad1a1 ffffffff84057a80 ffff8800a580af80 ffffffff83ad51c0 ffffffff83ae4310 ffffffff83ad51c0 ffff8801db606530 ffffffff813abcda ffff8801db606610 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] print_circular_bug.cold+0x2f7/0x44e kernel/locking/lockdep.c:1226 [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x37d6/0x4f50 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __raw_spin_lock include/linux/spinlock_api_smp.h:144 [inline] [] _raw_spin_lock+0x38/0x50 kernel/locking/spinlock.c:151 [] spin_lock include/linux/spinlock.h:302 [inline] [] __netif_tx_lock include/linux/netdevice.h:3306 [inline] [] sch_direct_xmit+0x238/0x700 net/sched/sch_generic.c:163 [] __dev_xmit_skb net/core/dev.c:2979 [inline] [] __dev_queue_xmit+0xd24/0x1bb0 net/core/dev.c:3197 [] dev_queue_xmit+0x18/0x20 net/core/dev.c:3263 [] neigh_resolve_output+0x4a0/0x7a0 net/core/neighbour.c:1329 [] dst_neigh_output include/net/dst.h:461 [inline] [] ip6_finish_output2+0x9c7/0x1dc0 net/ipv6/ip6_output.c:113 [] ip6_finish_output+0x2f3/0x750 net/ipv6/ip6_output.c:131 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip6_output+0x1b4/0x520 net/ipv6/ip6_output.c:145 [] dst_output include/net/dst.h:498 [inline] [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ndisc_send_skb+0x98d/0x1110 net/ipv6/ndisc.c:471 [] ndisc_send_ns+0x4bf/0x6b0 net/ipv6/ndisc.c:595 [] ndisc_solicit+0x2b2/0x440 net/ipv6/ndisc.c:686 [] neigh_probe+0xc8/0x100 net/core/neighbour.c:871 [] __neigh_event_send+0x2ab/0xc50 net/core/neighbour.c:1027 [] neigh_event_send include/net/neighbour.h:431 [inline] [] neigh_resolve_output+0x5ec/0x7a0 net/core/neighbour.c:1313 [] dst_neigh_output include/net/dst.h:461 [inline] [] ip6_finish_output2+0x9c7/0x1dc0 net/ipv6/ip6_output.c:113 [] ip6_finish_output+0x2f3/0x750 net/ipv6/ip6_output.c:131 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip6_output+0x1b4/0x520 net/ipv6/ip6_output.c:145 [] dst_output include/net/dst.h:498 [inline] [] ip6_local_out+0x9c/0x180 net/ipv6/output_core.c:169 [] ip6_send_skb+0xa2/0x340 net/ipv6/ip6_output.c:1725 [] ip6_push_pending_frames+0xbb/0xe0 net/ipv6/ip6_output.c:1745 [] icmpv6_push_pending_frames+0x336/0x530 net/ipv6/icmp.c:276 [] icmp6_send+0x1506/0x1b40 net/ipv6/icmp.c:537 [] icmpv6_param_prob+0x29/0x40 net/ipv6/icmp.c:551 [] ip6_frag_queue net/ipv6/reassembly.c:225 [inline] [] ipv6_frag_rcv+0x3f06/0x51e0 net/ipv6/reassembly.c:531 [] ip6_input_finish+0x57d/0x14f0 net/ipv6/ip6_input.c:248 [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ip6_input+0xf8/0x1f0 net/ipv6/ip6_input.c:280 [] dst_input include/net/dst.h:504 [inline] [] ip6_rcv_finish+0x14d/0x670 net/ipv6/ip6_input.c:62 [] NF_HOOK_THRESH include/linux/netfilter.h:226 [inline] [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ipv6_rcv+0xfc1/0x1a20 net/ipv6/ip6_input.c:186 [] __netif_receive_skb_core+0x1300/0x2950 net/core/dev.c:4041 [] __netif_receive_skb+0x58/0x1c0 net/core/dev.c:4076 [] process_backlog+0x200/0x630 net/core/dev.c:4673 [] napi_poll net/core/dev.c:4911 [inline] [] net_rx_action+0x367/0xd30 net/core/dev.c:4976 [] __do_softirq+0x226/0xa3f kernel/softirq.c:273 [] do_softirq_own_stack+0x1c/0x30 arch/x86/entry/entry_64.S:956 [] do_softirq.part.0+0x54/0x60 kernel/softirq.c:317 [] do_softirq+0x18/0x20 kernel/softirq.c:305 [] netif_rx_ni+0xeb/0x3b0 net/core/dev.c:3675 [] tun_get_user+0xdbf/0x2640 drivers/net/tun.c:1264 [] tun_chr_write_iter+0xda/0x190 drivers/net/tun.c:1283 [] do_iter_readv_writev+0x141/0x1e0 fs/read_write.c:666 [] compat_do_readv_writev+0x389/0x6e0 fs/read_write.c:984 [] compat_writev+0xe1/0x150 fs/read_write.c:1092 [] C_SYSC_writev fs/read_write.c:1112 [inline] [] compat_SyS_writev+0xdb/0x1c0 fs/read_write.c:1101 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a