====================================================== [ INFO: possible circular locking dependency detected ] 4.9.76-g8e170a5 #21 Not tainted ------------------------------------------------------- kworker/u4:4/9725 is trying to acquire lock: (&ndev->lock){++--..}, at: [] __ipv6_dev_mc_dec+0x45/0x340 net/ipv6/mcast.c:928 but task is already holding lock: (&tbl->lock){++-...}, at: [] neigh_ifdown+0x3d/0x250 net/core/neighbour.c:255 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756 __raw_write_lock_bh include/linux/rwlock_api_smp.h:203 [inline] _raw_write_lock_bh+0x3a/0x50 kernel/locking/spinlock.c:319 __neigh_create+0x7d9/0x1bb0 net/core/neighbour.c:492 neigh_create include/net/neighbour.h:313 [inline] ip6_neigh_lookup+0x8bd/0xa80 net/ipv6/route.c:217 dst_neigh_lookup include/net/dst.h:475 [inline] fib6_age+0x238/0x370 net/ipv6/ip6_fib.c:1793 fib6_clean_node+0x2c1/0x4a0 net/ipv6/ip6_fib.c:1654 fib6_walk_continue+0x39b/0x620 net/ipv6/ip6_fib.c:1583 fib6_walk+0xd9/0x150 net/ipv6/ip6_fib.c:1628 fib6_clean_tree+0xe5/0x130 net/ipv6/ip6_fib.c:1702 __fib6_clean_all+0xf9/0x230 net/ipv6/ip6_fib.c:1718 fib6_clean_all net/ipv6/ip6_fib.c:1729 [inline] fib6_run_gc+0x117/0x2c0 net/ipv6/ip6_fib.c:1826 fib6_gc_timer_cb+0x1c/0x20 net/ipv6/ip6_fib.c:1841 call_timer_fn+0x164/0x700 kernel/time/timer.c:1319 expire_timers kernel/time/timer.c:1359 [inline] __run_timers kernel/time/timer.c:1658 [inline] run_timer_softirq+0xe8c/0x1650 kernel/time/timer.c:1684 __do_softirq+0x206/0x951 kernel/softirq.c:284 invoke_softirq kernel/softirq.c:364 [inline] irq_exit+0x165/0x190 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:659 [inline] smp_apic_timer_interrupt+0x7b/0xa0 arch/x86/kernel/apic/apic.c:960 apic_timer_interrupt+0xa0/0xb0 arch/x86/entry/entry_64.S:735 __debug_check_no_obj_freed lib/debugobjects.c:730 [inline] debug_check_no_obj_freed+0x2c2/0xa10 lib/debugobjects.c:746 free_pages_prepare mm/page_alloc.c:1061 [inline] __free_pages_ok+0x1e5/0x16c0 mm/page_alloc.c:1263 free_compound_page+0x5e/0x70 mm/page_alloc.c:594 free_transhuge_page+0x99/0xc0 mm/huge_memory.c:2228 __put_compound_page+0x87/0xb0 mm/swap.c:94 release_pages+0x2e4/0x930 mm/swap.c:763 free_pages_and_swap_cache+0x113/0x160 mm/swap_state.c:273 tlb_flush_mmu_free+0xb4/0x160 mm/memory.c:259 zap_pte_range mm/memory.c:1216 [inline] zap_pmd_range mm/memory.c:1258 [inline] zap_pud_range mm/memory.c:1279 [inline] unmap_page_range+0xfe9/0x1830 mm/memory.c:1300 unmap_single_vma+0x10b/0x270 mm/memory.c:1345 unmap_vmas+0xf1/0x1b0 mm/memory.c:1375 exit_mmap+0x20b/0x400 mm/mmap.c:2986 __mmput kernel/fork.c:878 [inline] mmput+0xf3/0x2d0 kernel/fork.c:900 exit_mm kernel/exit.c:514 [inline] do_exit+0x70a/0x2a40 kernel/exit.c:820 do_group_exit+0x108/0x320 kernel/exit.c:937 get_signal+0x4d4/0x14e0 kernel/signal.c:2317 do_signal+0x87/0x1a00 arch/x86/kernel/signal.c:807 exit_to_usermode_loop+0xe1/0x120 arch/x86/entry/common.c:156 prepare_exit_to_usermode arch/x86/entry/common.c:190 [inline] syscall_return_slowpath arch/x86/entry/common.c:259 [inline] do_syscall_32_irqs_on arch/x86/entry/common.c:328 [inline] do_fast_syscall_32+0x5de/0x890 arch/x86/entry/common.c:384 entry_SYSENTER_compat+0x74/0x83 arch/x86/entry/entry_64_compat.S:127 lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756 __raw_write_lock_bh include/linux/rwlock_api_smp.h:203 [inline] _raw_write_lock_bh+0x3a/0x50 kernel/locking/spinlock.c:319 __ip6_ins_rt+0x4e/0x80 net/ipv6/route.c:925 ip6_route_add+0x140/0x1e0 net/ipv6/route.c:2114 addrconf_prefix_route+0x1db/0x2c0 net/ipv6/addrconf.c:2262 fixup_permanent_addr net/ipv6/addrconf.c:3306 [inline] addrconf_permanent_addr net/ipv6/addrconf.c:3329 [inline] addrconf_notify+0x1b8f/0x2230 net/ipv6/addrconf.c:3398 notifier_call_chain+0x90/0x1a0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x51/0x90 net/core/dev.c:1647 call_netdevice_notifiers net/core/dev.c:1663 [inline] __dev_notify_flags+0xf3/0x270 net/core/dev.c:6487 dev_change_flags+0xf5/0x140 net/core/dev.c:6520 do_setlink+0x917/0x2f80 net/core/rtnetlink.c:2023 rtnl_newlink+0xd6d/0x1550 net/core/rtnetlink.c:2557 rtnetlink_rcv_msg+0x4c3/0x640 net/core/rtnetlink.c:4059 netlink_rcv_skb+0x13e/0x370 net/netlink/af_netlink.c:2351 rtnetlink_rcv+0x2a/0x40 net/core/rtnetlink.c:4065 netlink_unicast_kernel net/netlink/af_netlink.c:1275 [inline] netlink_unicast+0x511/0x750 net/netlink/af_netlink.c:1301 netlink_sendmsg+0x8e8/0xc50 net/netlink/af_netlink.c:1847 sock_sendmsg_nosec net/socket.c:635 [inline] sock_sendmsg+0xca/0x110 net/socket.c:645 ___sys_sendmsg+0x6d1/0x7e0 net/socket.c:1969 __sys_sendmsg+0xd6/0x190 net/socket.c:2003 SYSC_sendmsg net/socket.c:2014 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2010 entry_SYSCALL_64_fastpath+0x23/0xe2 check_prev_add kernel/locking/lockdep.c:1828 [inline] check_prevs_add kernel/locking/lockdep.c:1938 [inline] validate_chain kernel/locking/lockdep.c:2265 [inline] __lock_acquire+0x2bf9/0x3640 kernel/locking/lockdep.c:3345 lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756 __raw_write_lock_bh include/linux/rwlock_api_smp.h:203 [inline] _raw_write_lock_bh+0x3a/0x50 kernel/locking/spinlock.c:319 __ipv6_dev_mc_dec+0x45/0x340 net/ipv6/mcast.c:928 ipv6_dev_mc_dec+0x82/0x110 net/ipv6/mcast.c:961 pndisc_destructor+0x13c/0x1f0 net/ipv6/ndisc.c:390 pneigh_ifdown net/core/neighbour.c:659 [inline] neigh_ifdown+0x149/0x250 net/core/neighbour.c:257 addrconf_ifdown+0xdf/0x10f0 net/ipv6/addrconf.c:3567 addrconf_notify+0x948/0x2230 net/ipv6/addrconf.c:3490 notifier_call_chain+0x90/0x1a0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x51/0x90 net/core/dev.c:1647 call_netdevice_notifiers net/core/dev.c:1663 [inline] rollback_registered_many+0x5b6/0x960 net/core/dev.c:6806 unregister_netdevice_many.part.101+0x1b/0x110 net/core/dev.c:7853 unregister_netdevice_many+0x39/0x50 net/core/dev.c:7852 ip_tunnel_delete_net+0x2ba/0x380 net/ipv4/ip_tunnel.c:1059 ipip_exit_net+0x12d/0x200 net/ipv4/ipip.c:652 ops_exit_list.isra.4+0xae/0x150 net/core/net_namespace.c:136 cleanup_net+0x31d/0x610 net/core/net_namespace.c:454 process_one_work+0x7e0/0x1610 kernel/workqueue.c:2091 worker_thread+0xe0/0x10d0 kernel/workqueue.c:2225 kthread+0x26d/0x300 kernel/kthread.c:211 ret_from_fork+0x46/0x60 arch/x86/entry/entry_64.S:460 other info that might help us debug this: Chain exists of: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&tbl->lock); lock(&tb->tb6_lock); lock(&tbl->lock); lock(&ndev->lock); *** DEADLOCK *** 5 locks held by kworker/u4:4/9725: #0: ("%s""netns"){.+.+.+}, at: [] work_static include/linux/workqueue.h:186 [inline] #0: ("%s""netns"){.+.+.+}, at: [] set_work_data kernel/workqueue.c:616 [inline] #0: ("%s""netns"){.+.+.+}, at: [] set_work_pool_and_clear_pending kernel/workqueue.c:643 [inline] #0: ("%s""netns"){.+.+.+}, at: [] process_one_work+0x6f2/0x1610 kernel/workqueue.c:2084 #1: (net_cleanup_work){+.+.+.}, at: [] process_one_work+0x72c/0x1610 kernel/workqueue.c:2088 #2: (net_mutex){+.+.+.}, at: [] cleanup_net+0x13f/0x610 net/core/net_namespace.c:420 #3: (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:70 #4: (&tbl->lock){++-...}, at: [] neigh_ifdown+0x3d/0x250 net/core/neighbour.c:255 stack backtrace: CPU: 1 PID: 9725 Comm: kworker/u4:4 Not tainted 4.9.76-g8e170a5 #21 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net ffff8801c366f1a8 ffffffff81d93149 ffffffff853b9960 ffffffff85398270 ffffffff8537dae0 ffff8801c35eb978 ffff8801c35eb000 ffff8801c366f1f0 ffffffff81237511 ffff8801c35eb978 00000000c35eb950 ffff8801c35eb978 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_circular_bug+0x271/0x310 kernel/locking/lockdep.c:1202 [] check_prev_add kernel/locking/lockdep.c:1828 [inline] [] check_prevs_add kernel/locking/lockdep.c:1938 [inline] [] validate_chain kernel/locking/lockdep.c:2265 [inline] [] __lock_acquire+0x2bf9/0x3640 kernel/locking/lockdep.c:3345 [] lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756 [] __raw_write_lock_bh include/linux/rwlock_api_smp.h:203 [inline] [] _raw_write_lock_bh+0x3a/0x50 kernel/locking/spinlock.c:319 [] __ipv6_dev_mc_dec+0x45/0x340 net/ipv6/mcast.c:928 [] ipv6_dev_mc_dec+0x82/0x110 net/ipv6/mcast.c:961 [] pndisc_destructor+0x13c/0x1f0 net/ipv6/ndisc.c:390 [] pneigh_ifdown net/core/neighbour.c:659 [inline] [] neigh_ifdown+0x149/0x250 net/core/neighbour.c:257 [] addrconf_ifdown+0xdf/0x10f0 net/ipv6/addrconf.c:3567 [] addrconf_notify+0x948/0x2230 net/ipv6/addrconf.c:3490 [] notifier_call_chain+0x90/0x1a0 kernel/notifier.c:93 [] __raw_notifier_call_chain kernel/notifier.c:394 [inline] [] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 [] call_netdevice_notifiers_info+0x51/0x90 net/core/dev.c:1647 [] call_netdevice_notifiers net/core/dev.c:1663 [inline] [] rollback_registered_many+0x5b6/0x960 net/core/dev.c:6806 [] unregister_netdevice_many.part.101+0x1b/0x110 net/core/dev.c:7853 [] unregister_netdevice_many+0x39/0x50 net/core/dev.c:7852 [] ip_tunnel_delete_net+0x2ba/0x380 net/ipv4/ip_tunnel.c:1059 [] ipip_exit_net+0x12d/0x200 net/ipv4/ipip.c:652 [] ops_exit_list.isra.4+0xae/0x150 net/core/net_namespace.c:136 [] cleanup_net+0x31d/0x610 net/core/net_namespace.c:454 [] process_one_work+0x7e0/0x1610 kernel/workqueue.c:2091 [] worker_thread+0xe0/0x10d0 kernel/workqueue.c:2225 [] kthread+0x26d/0x300 kernel/kthread.c:211 [] ret_from_fork+0x46/0x60 arch/x86/entry/entry_64.S:460 IPVS: Creating netns size=2536 id=24