[ 10.890794][ T252] [ 10.890997][ T252] ============================================ [ 10.891226][ T252] WARNING: possible recursive locking detected [ 10.891455][ T252] 6.13.0-rc5-virtme #1 Not tainted [ 10.891644][ T252] -------------------------------------------- [ 10.891865][ T252] python3/252 is trying to acquire lock: [ 10.892048][ T252] ffffffffb25f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 10.892416][ T252] [ 10.892416][ T252] but task is already holding lock: [ 10.892686][ T252] ffffffffb25f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 10.893042][ T252] [ 10.893042][ T252] other info that might help us debug this: [ 10.893313][ T252] Possible unsafe locking scenario: [ 10.893313][ T252] [ 10.893580][ T252] CPU0 [ 10.893720][ T252] ---- [ 10.893853][ T252] lock((netdev_chain).rwsem); [ 10.894033][ T252] lock((netdev_chain).rwsem); [ 10.894208][ T252] [ 10.894208][ T252] *** DEADLOCK *** [ 10.894208][ T252] [ 10.894469][ T252] May be due to missing lock nesting notation [ 10.894469][ T252] [ 10.894731][ T252] 8 locks held by python3/252: [ 10.894914][ T252] #0: ffff88800b1743f0 (sb_writers#7){.+.+}-{0:0}, at: ksys_write+0xf8/0x1d0 [ 10.895237][ T252] #1: ffff88800b6a9488 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x20b/0x460 [ 10.895554][ T252] #2: ffff8880091a2130 (kn->active#33){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22e/0x460 [ 10.895916][ T252] #3: ffffffffc052b628 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x12a/0x690 [netdevsim] [ 10.896330][ T252] #4: ffff88800a07a0e8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x76/0x3f0 [ 10.896651][ T252] #5: ffff88800a07d250 (&devlink->lock_key){+.+.}-{4:4}, at: nsim_drv_probe+0xb7/0x8b0 [netdevsim] [ 10.897018][ T252] #6: ffffffffb2607e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x46a/0xa60 [netdevsim] [ 10.897346][ T252] #7: ffffffffb25f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 10.897703][ T252] [ 10.897703][ T252] stack backtrace: [ 10.897922][ T252] CPU: 1 UID: 0 PID: 252 Comm: python3 Not tainted 6.13.0-rc5-virtme #1 [ 10.898205][ T252] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 10.898426][ T252] Call Trace: [ 10.898607][ T252] [ 10.898700][ T252] dump_stack_lvl+0x82/0xd0 [ 10.898888][ T252] print_deadlock_bug+0x40a/0x650 [ 10.899070][ T252] validate_chain+0x5bf/0xae0 [ 10.899251][ T252] ? __pfx_validate_chain+0x10/0x10 [ 10.899430][ T252] ? hlock_class+0x4e/0x130 [ 10.899609][ T252] ? mark_lock+0x38/0x3e0 [ 10.899746][ T252] __lock_acquire+0xb9a/0x1680 [ 10.899932][ T252] ? udp_tunnel_nic_netdevice_event+0xd1/0x5c0 [ 10.900156][ T252] ? really_probe+0x1df/0x920 [ 10.900335][ T252] lock_acquire.part.0+0xeb/0x330 [ 10.900515][ T252] ? blocking_notifier_call_chain+0x50/0x90 [ 10.900739][ T252] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 10.900961][ T252] ? find_held_lock+0x2c/0x110 [ 10.901137][ T252] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 10.901325][ T252] ? trace_lock_acquire+0x14c/0x1f0 [ 10.901511][ T252] ? lock_acquire+0x32/0xc0 [ 10.901694][ T252] ? blocking_notifier_call_chain+0x50/0x90 [ 10.901916][ T252] down_read+0x9f/0x340 [ 10.902054][ T252] ? blocking_notifier_call_chain+0x50/0x90 [ 10.902275][ T252] ? __pfx_down_read+0x10/0x10 [ 10.902453][ T252] ? notifier_call_chain+0xcd/0x150 [ 10.902641][ T252] blocking_notifier_call_chain+0x50/0x90 [ 10.902822][ T252] call_netdevice_notifiers+0x71/0xa0 [ 10.903002][ T252] ? __pfx_call_netdevice_notifiers+0x10/0x10 [ 10.903225][ T252] ? mutex_is_locked+0x1c/0x60 [ 10.903405][ T252] udp_tunnel_nic_register+0x591/0x870 [ 10.903582][ T252] udp_tunnel_nic_netdevice_event+0x11d/0x5c0 [ 10.903804][ T252] notifier_call_chain+0xcd/0x150 [ 10.903990][ T252] blocking_notifier_call_chain+0x66/0x90 [ 10.904168][ T252] register_netdevice+0xe75/0x1360 [ 10.904347][ T252] ? __pfx_register_netdevice+0x10/0x10 [ 10.904528][ T252] nsim_create+0x6c2/0xa60 [netdevsim] [ 10.904715][ T252] __nsim_dev_port_add+0x22f/0x6e0 [netdevsim] [ 10.904948][ T252] ? mark_lock+0x38/0x3e0 [ 10.905085][ T252] ? __pfx___nsim_dev_port_add+0x10/0x10 [netdevsim] [ 10.905324][ T252] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 10.905550][ T252] nsim_dev_port_add_all+0x39/0xf0 [netdevsim] [ 10.905783][ T252] nsim_drv_probe+0x61e/0x8b0 [netdevsim] [ 10.905972][ T252] ? __pfx_nsim_drv_probe+0x10/0x10 [netdevsim] [ 10.906201][ T252] ? kernfs_create_link+0x173/0x240 [ 10.906380][ T252] ? kernfs_put+0x1c/0x40 [ 10.906524][ T252] ? sysfs_do_create_link_sd+0x8c/0x100 [ 10.906704][ T252] really_probe+0x1df/0x920 [ 10.906885][ T252] __driver_probe_device+0x2e6/0x3e0 [ 10.907062][ T252] driver_probe_device+0x49/0x140 [ 10.907242][ T252] __device_attach_driver+0x192/0x2b0 [ 10.907419][ T252] ? __pfx___device_attach_driver+0x10/0x10 [ 10.907643][ T252] bus_for_each_drv+0x107/0x1a0 [ 10.907827][ T252] ? __pfx_bus_for_each_drv+0x10/0x10 [ 10.908007][ T252] ? bus_to_subsys+0xd5/0x110 [ 10.908184][ T252] ? __pfx___lock_release+0x10/0x10 [ 10.908364][ T252] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 10.908545][ T252] __device_attach+0x1a3/0x3f0 [ 10.908723][ T252] ? __pfx___device_attach+0x10/0x10 [ 10.908901][ T252] ? bus_to_subsys+0xd5/0x110 [ 10.909087][ T252] ? do_raw_spin_unlock+0x58/0x220 [ 10.909266][ T252] bus_probe_device+0x133/0x180 [ 10.909446][ T252] device_add+0x99d/0x1110 [ 10.909624][ T252] ? __pfx_device_add+0x10/0x10 [ 10.909803][ T252] ? __init_waitqueue_head+0xcf/0x150 [ 10.909985][ T252] new_device_store+0x393/0x690 [netdevsim] [ 10.910219][ T252] ? __pfx_new_device_store+0x10/0x10 [netdevsim] [ 10.910461][ T252] ? __pfx_sysfs_kf_write+0x10/0x10 [ 10.910640][ T252] ? sysfs_file_ops+0x11e/0x170 [ 10.910821][ T252] ? __pfx_sysfs_kf_write+0x10/0x10 [ 10.910999][ T252] kernfs_fop_write_iter+0x2ba/0x460 [ 10.911179][ T252] vfs_write+0xa81/0x11e0 [ 10.911316][ T252] ? __pfx_vfs_write+0x10/0x10 [ 10.911493][ T252] ? __lock_release+0x103/0x460 [ 10.911689][ T252] ? do_user_addr_fault+0x972/0xe30 [ 10.911872][ T252] ? __pfx___up_read+0x10/0x10 [ 10.912052][ T252] ksys_write+0xf8/0x1d0 [ 10.912185][ T252] ? __pfx_ksys_write+0x10/0x10 [ 10.912365][ T252] ? do_user_addr_fault+0x97c/0xe30 [ 10.912544][ T252] do_syscall_64+0xc1/0x1d0 [ 10.912725][ T252] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 10.912953][ T252] RIP: 0033:0x7f1476268b77 [ 10.913143][ T252] Code: 0b 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24 [ 10.913761][ T252] RSP: 002b:00007fff6e98f578 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 10.914033][ T252] RAX: ffffffffffffffda RBX: 00007f147604e140 RCX: 00007f1476268b77 [ 10.914320][ T252] RDX: 0000000000000007 RSI: 0000558f02720680 RDI: 0000000000000006 [ 10.914592][ T252] RBP: 0000000000000007 R08: 0000000000000000 R09: 0000000000000000 [ 10.914855][ T252] R10: 0000000000000002 R11: 0000000000000246 R12: 00007f1468105c40 [ 10.915119][ T252] R13: 0000558f02720680 R14: 0000000000000006 R15: 0000558f02517900 [ 10.915406][ T252] [ 10.977408][ T256] netdevsim netdevsim391 eni391np1: renamed from eth0