[ 253.020434][ T10] [ 253.020595][ T10] ===================================================== [ 253.020912][ T10] WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected [ 253.021280][ T10] 6.9.0-rc1-virtme #1 Not tainted [ 253.021509][ T10] ----------------------------------------------------- [ 253.021784][ T10] kworker/u16:0/10 [HC0[0]:SC0[2]:HE1:SE0] is trying to acquire: [ 253.022121][ T10] ffff888001a58968 (&p->alloc_lock){+.+.}-{2:2}, at: __get_task_comm+0x27/0x70 [ 253.022557][ T10] [ 253.022557][ T10] and this task is already holding: [ 253.022904][ T10] ffff88802f83efd8 (&ul->lock){+.-.}-{2:2}, at: rt6_uncached_list_flush_dev+0x138/0x840 [ 253.023200][ T10] which would create a new lock dependency: [ 253.023417][ T10] (&ul->lock){+.-.}-{2:2} -> (&p->alloc_lock){+.+.}-{2:2} [ 253.023727][ T10] [ 253.023727][ T10] but this new dependency connects a SOFTIRQ-irq-safe lock: [ 253.024138][ T10] (&ul->lock){+.-.}-{2:2} [ 253.024146][ T10] [ 253.024146][ T10] ... which became SOFTIRQ-irq-safe at: [ 253.024688][ T10] __lock_acquire+0x797/0x1570 [ 253.024938][ T10] lock_acquire.part.0+0xeb/0x330 [ 253.025192][ T10] _raw_spin_lock_bh+0x38/0x50 [ 253.025439][ T10] rt6_uncached_list_del+0x77/0x200 [ 253.025662][ T10] ip6_dst_destroy+0x74/0x1e0 [ 253.025909][ T10] dst_destroy+0xba/0x310 [ 253.026123][ T10] rcu_do_batch+0x3c0/0xfb0 [ 253.026344][ T10] rcu_core+0x2be/0x500 [ 253.026510][ T10] __do_softirq+0x1f8/0x5df [ 253.026738][ T10] irq_exit_rcu+0x97/0xc0 [ 253.026967][ T10] sysvec_apic_timer_interrupt+0x75/0x80 [ 253.027191][ T10] asm_sysvec_apic_timer_interrupt+0x1a/0x20 [ 253.027473][ T10] default_idle+0xf/0x20 [ 253.027640][ T10] default_idle_call+0x6d/0xb0 [ 253.027873][ T10] cpuidle_idle_call+0x1f4/0x280 [ 253.028114][ T10] do_idle+0xf9/0x160 [ 253.028276][ T10] cpu_startup_entry+0x54/0x60 [ 253.028500][ T10] rest_init+0x14f/0x260 [ 253.028669][ T10] start_kernel+0x318/0x3d0 [ 253.028886][ T10] x86_64_start_reservations+0x18/0x30 [ 253.029101][ T10] x86_64_start_kernel+0xba/0x110 [ 253.029328][ T10] common_startup_64+0x12c/0x138 [ 253.029548][ T10] [ 253.029548][ T10] to a SOFTIRQ-irq-unsafe lock: [ 253.029829][ T10] (&p->alloc_lock){+.+.}-{2:2} [ 253.029836][ T10] [ 253.029836][ T10] ... which became SOFTIRQ-irq-unsafe at: [ 253.030404][ T10] ... [ 253.030406][ T10] __lock_acquire+0x797/0x1570 [ 253.030754][ T10] lock_acquire.part.0+0xeb/0x330 [ 253.030988][ T10] _raw_spin_lock+0x30/0x40 [ 253.031230][ T10] set_mems_allowed+0x1d/0x210 [ 253.031442][ T10] kernel_init_freeable+0x72/0x310 [ 253.031578][ T10] kernel_init+0x20/0x200 [ 253.031713][ T10] ret_from_fork+0x31/0x70 [ 253.031874][ T10] ret_from_fork_asm+0x1a/0x30 [ 253.032087][ T10] [ 253.032087][ T10] other info that might help us debug this: [ 253.032087][ T10] [ 253.032410][ T10] Possible interrupt unsafe locking scenario: [ 253.032410][ T10] [ 253.032616][ T10] CPU0 CPU1 [ 253.032769][ T10] ---- ---- [ 253.032952][ T10] lock(&p->alloc_lock); [ 253.033118][ T10] local_irq_disable(); [ 253.033383][ T10] lock(&ul->lock); [ 253.033589][ T10] lock(&p->alloc_lock); [ 253.033811][ T10] [ 253.033971][ T10] lock(&ul->lock); [ 253.034143][ T10] [ 253.034143][ T10] *** DEADLOCK *** [ 253.034143][ T10] [ 253.034607][ T10] 5 locks held by kworker/u16:0/10: [ 253.034841][ T10] #0: ffff8880018f2948 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0xda6/0x1730 [ 253.035344][ T10] #1: ffffc900000afda0 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0xde2/0x1730 [ 253.035746][ T10] #2: ffffffffa6579890 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0xbc/0xa20 [ 253.036161][ T10] #3: ffffffffa6594cc8 (rtnl_mutex){+.+.}-{3:3}, at: default_device_exit_batch+0x81/0x2d0 [ 253.036757][ T10] #4: ffff88802f83efd8 (&ul->lock){+.-.}-{2:2}, at: rt6_uncached_list_flush_dev+0x138/0x840 [ 253.037222][ T10] [ 253.037222][ T10] the dependencies between SOFTIRQ-irq-safe lock and the holding lock: [ 253.037776][ T10] -> (&ul->lock){+.-.}-{2:2} { [ 253.037986][ T10] HARDIRQ-ON-W at: [ 253.038162][ T10] __lock_acquire+0x797/0x1570 [ 253.038460][ T10] lock_acquire.part.0+0xeb/0x330 [ 253.038907][ T10] _raw_spin_lock_bh+0x38/0x50 [ 253.039200][ T10] rt6_uncached_list_add+0x55/0x1b0 [ 253.039489][ T10] icmp6_dst_alloc+0x2c0/0x450 [ 253.039916][ T10] mld_sendpack+0x529/0xed0 [ 253.040196][ T10] mld_ifc_work+0x32/0x1f0 [ 253.040468][ T10] process_one_work+0xe2c/0x1730 [ 253.040767][ T10] worker_thread+0x587/0xd30 [ 253.041198][ T10] kthread+0x28a/0x350 [ 253.041403][ T10] ret_from_fork+0x31/0x70 [ 253.041619][ T10] ret_from_fork_asm+0x1a/0x30 [ 253.041921][ T10] IN-SOFTIRQ-W at: [ 253.042060][ T10] __lock_acquire+0x797/0x1570 [ 253.042350][ T10] lock_acquire.part.0+0xeb/0x330 [ 253.042621][ T10] _raw_spin_lock_bh+0x38/0x50 [ 253.043041][ T10] rt6_uncached_list_del+0x77/0x200 [ 253.043321][ T10] ip6_dst_destroy+0x74/0x1e0 [ 253.043600][ T10] dst_destroy+0xba/0x310 [ 253.044025][ T10] rcu_do_batch+0x3c0/0xfb0 [ 253.044333][ T10] rcu_core+0x2be/0x500 [ 253.044763][ T10] __do_softirq+0x1f8/0x5df [ 253.045385][ T10] irq_exit_rcu+0x97/0xc0 [ 253.045647][ T10] sysvec_apic_timer_interrupt+0x75/0x80 [ 253.045993][ T10] asm_sysvec_apic_timer_interrupt+0x1a/0x20 [ 253.046369][ T10] default_idle+0xf/0x20 [ 253.046803][ T10] default_idle_call+0x6d/0xb0 [ 253.047087][ T10] cpuidle_idle_call+0x1f4/0x280 [ 253.047380][ T10] do_idle+0xf9/0x160 [ 253.047755][ T10] cpu_startup_entry+0x54/0x60 [ 253.048043][ T10] rest_init+0x14f/0x260 [ 253.048333][ T10] start_kernel+0x318/0x3d0 [ 253.048622][ T10] x86_64_start_reservations+0x18/0x30 [ 253.049085][ T10] x86_64_start_kernel+0xba/0x110 [ 253.049370][ T10] common_startup_64+0x12c/0x138 [ 253.049656][ T10] INITIAL USE at: [ 253.049829][ T10] __lock_acquire+0x797/0x1570 [ 253.050251][ T10] lock_acquire.part.0+0xeb/0x330 [ 253.050539][ T10] _raw_spin_lock_bh+0x38/0x50 [ 253.050827][ T10] rt6_uncached_list_add+0x55/0x1b0 [ 253.051137][ T10] icmp6_dst_alloc+0x2c0/0x450 [ 253.051323][ T10] mld_sendpack+0x529/0xed0 [ 253.051547][ T10] mld_ifc_work+0x32/0x1f0 [ 253.051910][ T10] process_one_work+0xe2c/0x1730 [ 253.052110][ T10] worker_thread+0x587/0xd30 [ 253.052325][ T10] kthread+0x28a/0x350 [ 253.052533][ T10] ret_from_fork+0x31/0x70 [ 253.052936][ T10] ret_from_fork_asm+0x1a/0x30 [ 253.053211][ T10] } [ 253.053328][ T10] ... key at: [] __key.16+0x0/0x40 [ 253.053667][ T10] [ 253.053667][ T10] the dependencies between the lock to be acquired [ 253.053670][ T10] and SOFTIRQ-irq-unsafe lock: [ 253.054412][ T10] -> (&p->alloc_lock){+.+.}-{2:2} { [ 253.054662][ T10] HARDIRQ-ON-W at: [ 253.054835][ T10] __lock_acquire+0x797/0x1570 [ 253.055276][ T10] lock_acquire.part.0+0xeb/0x330 [ 253.055559][ T10] _raw_spin_lock+0x30/0x40 [ 253.055842][ T10] set_mems_allowed+0x1d/0x210 [ 253.056273][ T10] kernel_init_freeable+0x72/0x310 [ 253.056565][ T10] kernel_init+0x20/0x200 [ 253.056851][ T10] ret_from_fork+0x31/0x70 [ 253.057301][ T10] ret_from_fork_asm+0x1a/0x30 [ 253.057585][ T10] SOFTIRQ-ON-W at: [ 253.057756][ T10] __lock_acquire+0x797/0x1570 [ 253.058041][ T10] lock_acquire.part.0+0xeb/0x330 [ 253.058328][ T10] _raw_spin_lock+0x30/0x40 [ 253.058610][ T10] set_mems_allowed+0x1d/0x210 [ 253.058898][ T10] kernel_init_freeable+0x72/0x310 [ 253.059184][ T10] kernel_init+0x20/0x200 [ 253.059465][ T10] ret_from_fork+0x31/0x70 [ 253.059750][ T10] ret_from_fork_asm+0x1a/0x30 [ 253.060033][ T10] INITIAL USE at: [ 253.060370][ T10] __lock_acquire+0x797/0x1570 [ 253.060642][ T10] lock_acquire.part.0+0xeb/0x330 [ 253.060903][ T10] _raw_spin_lock+0x30/0x40 [ 253.061178][ T10] set_mems_allowed+0x1d/0x210 [ 253.061469][ T10] kernel_init_freeable+0x72/0x310 [ 253.061745][ T10] kernel_init+0x20/0x200 [ 253.062031][ T10] ret_from_fork+0x31/0x70 [ 253.062315][ T10] ret_from_fork_asm+0x1a/0x30 [ 253.062605][ T10] } [ 253.062718][ T10] ... key at: [] __key.387+0x0/0x40 [ 253.063071][ T10] ... acquired at: [ 253.063244][ T10] check_prev_add+0x194/0xce0 [ 253.063473][ T10] validate_chain+0x71d/0x9b0 [ 253.063704][ T10] __lock_acquire+0xaf0/0x1570 [ 253.063938][ T10] lock_acquire.part.0+0xeb/0x330 [ 253.064170][ T10] _raw_spin_lock+0x30/0x40 [ 253.064551][ T10] __get_task_comm+0x27/0x70 [ 253.064792][ T10] ref_tracker_alloc+0x2ee/0x490 [ 253.065034][ T10] rt6_uncached_list_flush_dev+0x494/0x840 [ 253.065317][ T10] rt6_disable_ip+0xd9/0x140 [ 253.065545][ T10] addrconf_ifdown.isra.0+0x103/0x1560 [ 253.065775][ T10] addrconf_notify+0xd1/0xd60 [ 253.065999][ T10] notifier_call_chain+0xcd/0x150 [ 253.066230][ T10] dev_close_many+0x2d8/0x650 [ 253.066450][ T10] unregister_netdevice_many_notify+0x3d5/0x1190 [ 253.066740][ T10] default_device_exit_batch+0x234/0x2d0 [ 253.067023][ T10] cleanup_net+0x4f3/0xa20 [ 253.067255][ T10] process_one_work+0xe2c/0x1730 [ 253.067486][ T10] worker_thread+0x587/0xd30 [ 253.067721][ T10] kthread+0x28a/0x350 [ 253.067894][ T10] ret_from_fork+0x31/0x70 [ 253.068124][ T10] ret_from_fork_asm+0x1a/0x30 [ 253.068495][ T10] [ 253.068617][ T10] [ 253.068617][ T10] stack backtrace: [ 253.068918][ T10] CPU: 2 PID: 10 Comm: kworker/u16:0 Not tainted 6.9.0-rc1-virtme #1 [ 253.069252][ T10] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 253.069834][ T10] Workqueue: netns cleanup_net [ 253.070095][ T10] Call Trace: [ 253.070262][ T10] [ 253.070345][ T10] dump_stack_lvl+0x82/0xd0 [ 253.070593][ T10] print_bad_irq_dependency+0x957/0xd40 [ 253.070798][ T10] ? __pfx_print_bad_irq_dependency+0x10/0x10 [ 253.071075][ T10] ? __pfx_usage_skip+0x10/0x10 [ 253.071303][ T10] ? __bfs+0x246/0x650 [ 253.071507][ T10] ? __pfx_usage_match+0x10/0x10 [ 253.071722][ T10] check_irq_usage+0x596/0x850 [ 253.071944][ T10] ? arch_stack_walk+0x8c/0xf0 [ 253.072172][ T10] ? __pfx_check_irq_usage+0x10/0x10 [ 253.072541][ T10] ? __bfs+0x246/0x650 [ 253.072714][ T10] ? __pfx_hlock_conflict+0x10/0x10 [ 253.072944][ T10] ? check_path.constprop.0+0x24/0x50 [ 253.073166][ T10] ? check_noncircular+0x14c/0x3e0 [ 253.073393][ T10] ? __pfx_check_noncircular+0x10/0x10 [ 253.073766][ T10] ? check_prev_add+0x194/0xce0 [ 253.073993][ T10] check_prev_add+0x194/0xce0 [ 253.074219][ T10] ? validate_chain+0x130/0x9b0 [ 253.074455][ T10] validate_chain+0x71d/0x9b0 [ 253.074940][ T10] ? mark_lock+0x38/0x3e0 [ 253.075149][ T10] ? __pfx_validate_chain+0x10/0x10 [ 253.075388][ T10] ? hlock_class+0x4e/0x130 [ 253.075614][ T10] ? mark_lock+0x38/0x3e0 [ 253.075791][ T10] __lock_acquire+0xaf0/0x1570 [ 253.076171][ T10] lock_acquire.part.0+0xeb/0x330 [ 253.076398][ T10] ? __get_task_comm+0x27/0x70 [ 253.076630][ T10] ? mark_lock+0x38/0x3e0 [ 253.076808][ T10] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 253.077183][ T10] ? trace_lock_acquire+0x135/0x1c0 [ 253.077417][ T10] ? __get_task_comm+0x27/0x70 [ 253.077648][ T10] ? lock_acquire+0x32/0xc0 [ 253.077881][ T10] ? __get_task_comm+0x27/0x70 [ 253.078151][ T10] _raw_spin_lock+0x30/0x40 [ 253.078541][ T10] ? __get_task_comm+0x27/0x70 [ 253.078757][ T10] __get_task_comm+0x27/0x70 [ 253.078963][ T10] ref_tracker_alloc+0x2ee/0x490 [ 253.079128][ T10] ? __pfx_ref_tracker_alloc+0x10/0x10 [ 253.079296][ T10] ? __lock_release+0x103/0x460 [ 253.079468][ T10] ? rt6_uncached_list_flush_dev+0x494/0x840 [ 253.079759][ T10] ? rt6_disable_ip+0xd9/0x140 [ 253.079981][ T10] ? addrconf_ifdown.isra.0+0x103/0x1560 [ 253.080215][ T10] ? addrconf_notify+0xd1/0xd60 [ 253.080444][ T10] ? notifier_call_chain+0xcd/0x150 [ 253.080675][ T10] ? dev_close_many+0x2d8/0x650 [ 253.080913][ T10] ? unregister_netdevice_many_notify+0x3d5/0x1190 [ 253.081193][ T10] ? default_device_exit_batch+0x234/0x2d0 [ 253.081473][ T10] ? cleanup_net+0x4f3/0xa20 [ 253.081700][ T10] ? process_one_work+0xe2c/0x1730 [ 253.081951][ T10] ? worker_thread+0x587/0xd30 [ 253.082328][ T10] ? kthread+0x28a/0x350 [ 253.082503][ T10] ? ret_from_fork+0x31/0x70 [ 253.082730][ T10] ? ret_from_fork_asm+0x1a/0x30 [ 253.082982][ T10] ? in6_dev_get+0xcc/0x210 [ 253.083214][ T10] rt6_uncached_list_flush_dev+0x494/0x840 [ 253.083500][ T10] rt6_disable_ip+0xd9/0x140 [ 253.083723][ T10] ? __pfx_rt6_disable_ip+0x10/0x10 [ 253.083970][ T10] ? mark_lock+0x38/0x3e0 [ 253.084142][ T10] addrconf_ifdown.isra.0+0x103/0x1560 [ 253.084370][ T10] ? __try_to_del_timer_sync+0xe7/0x140 [ 253.084619][ T10] ? __pfx_addrconf_ifdown.isra.0+0x10/0x10 [ 253.084923][ T10] addrconf_notify+0xd1/0xd60 [ 253.085161][ T10] ? fib_netdev_event+0x186/0x5a0 [ 253.085396][ T10] notifier_call_chain+0xcd/0x150 [ 253.085626][ T10] dev_close_many+0x2d8/0x650 [ 253.085858][ T10] ? __pfx_dev_close_many+0x10/0x10 [ 253.086085][ T10] ? default_device_exit_batch+0x81/0x2d0 [ 253.086472][ T10] ? trace_contention_end+0xdc/0x140 [ 253.086701][ T10] unregister_netdevice_many_notify+0x3d5/0x1190 [ 253.086989][ T10] ? mutex_is_locked+0x17/0x50 [ 253.087213][ T10] ? __pfx_unregister_netdevice_many_notify+0x10/0x10 [ 253.087495][ T10] ? __pfx_unregister_netdevice_queue+0x10/0x10 [ 253.087783][ T10] default_device_exit_batch+0x234/0x2d0 [ 253.087949][ T10] ? __pfx_default_device_exit_batch+0x10/0x10 [ 253.088134][ T10] ? mutex_is_locked+0x17/0x50 [ 253.088307][ T10] ? nexthop_net_exit_batch_rtnl+0x83/0x210 [ 253.088578][ T10] cleanup_net+0x4f3/0xa20 [ 253.088766][ T10] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 253.088919][ T10] ? __pfx_cleanup_net+0x10/0x10 [ 253.089073][ T10] ? trace_lock_acquire+0x135/0x1c0 [ 253.089236][ T10] ? process_one_work+0xde2/0x1730 [ 253.089426][ T10] ? lock_acquire+0x32/0xc0 [ 253.089645][ T10] ? process_one_work+0xde2/0x1730 [ 253.089982][ T10] process_one_work+0xe2c/0x1730 [ 253.090169][ T10] ? __pfx___lock_release+0x10/0x10 [ 253.090390][ T10] ? __pfx_process_one_work+0x10/0x10 [ 253.090625][ T10] ? assign_work+0x16c/0x240 [ 253.091128][ T10] worker_thread+0x587/0xd30 [ 253.091366][ T10] ? __pfx_worker_thread+0x10/0x10 [ 253.091597][ T10] kthread+0x28a/0x350 [ 253.091770][ T10] ? __pfx_kthread+0x10/0x10 [ 253.092135][ T10] ret_from_fork+0x31/0x70 [ 253.092363][ T10] ? __pfx_kthread+0x10/0x10 [ 253.092592][ T10] ret_from_fork_asm+0x1a/0x30 [ 253.092827][ T10]