====================================================== [ INFO: possible circular locking dependency detected ] 4.4.174+ #17 Not tainted ------------------------------------------------------- syz-executor.4/7131 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 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] [] pgd_dtor arch/x86/mm/pgtable.c:142 [inline] [] pgd_free+0x2d/0x270 arch/x86/mm/pgtable.c:408 [] mm_free_pgd kernel/fork.c:554 [inline] [] __mmdrop+0x69/0x1c0 kernel/fork.c:700 [] mmdrop include/linux/sched.h:2794 [inline] [] finish_task_switch+0x20d/0x660 kernel/sched/core.c:2683 [] context_switch kernel/sched/core.c:2807 [inline] [] __schedule+0x7e3/0x1ee0 kernel/sched/core.c:3326 [] schedule+0x99/0x1d0 kernel/sched/core.c:3355 [] wb_wait_for_completion fs/fs-writeback.c:221 [inline] [] wb_wait_for_completion+0x11d/0x1c0 fs/fs-writeback.c:217 [] __writeback_inodes_sb_nr+0x1fe/0x2f0 fs/fs-writeback.c:2243 [] try_to_writeback_inodes_sb_nr+0x4d/0x70 fs/fs-writeback.c:2294 [] try_to_writeback_inodes_sb+0x87/0xb0 fs/fs-writeback.c:2310 [] ext4_nonda_switch+0x172/0x1c0 fs/ext4/inode.c:2720 [] ext4_da_write_begin+0x103/0xf10 fs/ext4/inode.c:2758 [] generic_perform_write+0x281/0x540 mm/filemap.c:2591 [] __generic_file_write_iter+0x350/0x540 mm/filemap.c:2716 [] ext4_file_write_iter+0x4fd/0xc70 fs/ext4/file.c:171 [] new_sync_write fs/read_write.c:480 [inline] [] __vfs_write+0x2e8/0x3d0 fs/read_write.c:493 [] vfs_write+0x182/0x4e0 fs/read_write.c:540 [] SYSC_write fs/read_write.c:587 [inline] [] SyS_write+0xdc/0x1c0 fs/read_write.c:579 [] 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.4/7131: #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: 7131 Comm: syz-executor.4 Not tainted 4.4.174+ #17 0000000000000000 5cd3d0cdb0692ce2 ffff8801db6064e0 ffffffff81aad1a1 ffffffff84057a80 ffff8801d31a4740 ffffffff83ad4e60 ffffffff83af8f80 ffffffff83ad4e60 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 netlink: 44 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 44 bytes leftover after parsing attributes in process `syz-executor.2'. audit_printk_skb: 45 callbacks suppressed audit: type=1400 audit(1572534904.874:179): avc: denied { create } for pid=7258 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 netlink: 44 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 44 bytes leftover after parsing attributes in process `syz-executor.2'. audit: type=1400 audit(1572534905.004:180): avc: denied { create } for pid=7258 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1572534905.154:181): avc: denied { create } for pid=7305 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1572534905.274:182): avc: denied { create } for pid=7330 comm="syz-executor.5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1572534905.394:183): avc: denied { create } for pid=7339 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 netlink: 64 bytes leftover after parsing attributes in process `syz-executor.1'. audit: type=1400 audit(1572534905.664:184): avc: denied { create } for pid=7370 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 netlink: 64 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 64 bytes leftover after parsing attributes in process `syz-executor.1'. audit: type=1400 audit(1572534905.994:185): avc: denied { create } for pid=7404 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1572534906.344:186): avc: denied { create } for pid=7437 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1572534906.534:187): avc: denied { create } for pid=7463 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1572534906.754:188): avc: denied { create } for pid=7476 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0