[ 349.931155][ T4904] [ 349.931367][ T4904] ============================================ [ 349.931594][ T4904] WARNING: possible recursive locking detected [ 349.931812][ T4904] 6.13.0-rc5-virtme #1 Not tainted [ 349.931987][ T4904] -------------------------------------------- [ 349.932210][ T4904] python3/4904 is trying to acquire lock: [ 349.932397][ T4904] ffffffffa55f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 349.932774][ T4904] [ 349.932774][ T4904] but task is already holding lock: [ 349.933036][ T4904] ffffffffa55f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 349.933394][ T4904] [ 349.933394][ T4904] other info that might help us debug this: [ 349.933653][ T4904] Possible unsafe locking scenario: [ 349.933653][ T4904] [ 349.933923][ T4904] CPU0 [ 349.934064][ T4904] ---- [ 349.934197][ T4904] lock((netdev_chain).rwsem); [ 349.934387][ T4904] lock((netdev_chain).rwsem); [ 349.934568][ T4904] [ 349.934568][ T4904] *** DEADLOCK *** [ 349.934568][ T4904] [ 349.934831][ T4904] May be due to missing lock nesting notation [ 349.934831][ T4904] [ 349.935097][ T4904] 8 locks held by python3/4904: [ 349.935277][ T4904] #0: ffff88800b17c3f0 (sb_writers#7){.+.+}-{0:0}, at: ksys_write+0xf8/0x1d0 [ 349.935597][ T4904] #1: ffff88800ce9ca88 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x20b/0x460 [ 349.935915][ T4904] #2: ffff888009f7cd90 (kn->active#34){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22e/0x460 [ 349.936272][ T4904] #3: ffffffffc064b628 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x12a/0x690 [netdevsim] [ 349.936693][ T4904] #4: ffff88801f8538e8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x76/0x3f0 [ 349.937012][ T4904] #5: ffff88801f850a50 (&devlink->lock_key){+.+.}-{4:4}, at: nsim_drv_probe+0xb7/0x8b0 [netdevsim] [ 349.937379][ T4904] #6: ffffffffa5607e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x46a/0xa60 [netdevsim] [ 349.937711][ T4904] #7: ffffffffa55f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 349.938073][ T4904] [ 349.938073][ T4904] stack backtrace: [ 349.938293][ T4904] CPU: 2 UID: 0 PID: 4904 Comm: python3 Not tainted 6.13.0-rc5-virtme #1 [ 349.938559][ T4904] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 349.938799][ T4904] Call Trace: [ 349.938939][ T4904] [ 349.939036][ T4904] dump_stack_lvl+0x82/0xd0 [ 349.939220][ T4904] print_deadlock_bug+0x40a/0x650 [ 349.939401][ T4904] validate_chain+0x5bf/0xae0 [ 349.939583][ T4904] ? __pfx_validate_chain+0x10/0x10 [ 349.939763][ T4904] ? hlock_class+0x4e/0x130 [ 349.939939][ T4904] ? mark_lock+0x38/0x3e0 [ 349.940075][ T4904] __lock_acquire+0xb9a/0x1680 [ 349.940278][ T4904] ? udp_tunnel_nic_netdevice_event+0xd1/0x5c0 [ 349.940504][ T4904] ? really_probe+0x1df/0x920 [ 349.940683][ T4904] lock_acquire.part.0+0xeb/0x330 [ 349.940859][ T4904] ? blocking_notifier_call_chain+0x50/0x90 [ 349.941086][ T4904] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 349.941308][ T4904] ? find_held_lock+0x2c/0x110 [ 349.941485][ T4904] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 349.941670][ T4904] ? trace_lock_acquire+0x14c/0x1f0 [ 349.941850][ T4904] ? lock_acquire+0x32/0xc0 [ 349.942029][ T4904] ? blocking_notifier_call_chain+0x50/0x90 [ 349.942252][ T4904] down_read+0x9f/0x340 [ 349.942391][ T4904] ? blocking_notifier_call_chain+0x50/0x90 [ 349.942613][ T4904] ? __pfx_down_read+0x10/0x10 [ 349.942795][ T4904] ? notifier_call_chain+0xcd/0x150 [ 349.942983][ T4904] blocking_notifier_call_chain+0x50/0x90 [ 349.943164][ T4904] call_netdevice_notifiers+0x71/0xa0 [ 349.943345][ T4904] ? __pfx_call_netdevice_notifiers+0x10/0x10 [ 349.943567][ T4904] ? mutex_is_locked+0x1c/0x60 [ 349.943749][ T4904] udp_tunnel_nic_register+0x591/0x870 [ 349.943937][ T4904] udp_tunnel_nic_netdevice_event+0x11d/0x5c0 [ 349.944157][ T4904] notifier_call_chain+0xcd/0x150 [ 349.944351][ T4904] blocking_notifier_call_chain+0x66/0x90 [ 349.944531][ T4904] register_netdevice+0xe75/0x1360 [ 349.944711][ T4904] ? __pfx_register_netdevice+0x10/0x10 [ 349.944892][ T4904] nsim_create+0x6c2/0xa60 [netdevsim] [ 349.945085][ T4904] __nsim_dev_port_add+0x22f/0x6e0 [netdevsim] [ 349.945319][ T4904] ? mark_lock+0x38/0x3e0 [ 349.945461][ T4904] ? __pfx___nsim_dev_port_add+0x10/0x10 [netdevsim] [ 349.945693][ T4904] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 349.945919][ T4904] nsim_dev_port_add_all+0x39/0xf0 [netdevsim] [ 349.946152][ T4904] nsim_drv_probe+0x61e/0x8b0 [netdevsim] [ 349.946339][ T4904] ? __pfx_nsim_drv_probe+0x10/0x10 [netdevsim] [ 349.946572][ T4904] ? kernfs_create_link+0x173/0x240 [ 349.946759][ T4904] ? kernfs_put+0x1c/0x40 [ 349.946897][ T4904] ? sysfs_do_create_link_sd+0x8c/0x100 [ 349.947077][ T4904] really_probe+0x1df/0x920 [ 349.947256][ T4904] __driver_probe_device+0x2e6/0x3e0 [ 349.947436][ T4904] driver_probe_device+0x49/0x140 [ 349.947614][ T4904] __device_attach_driver+0x192/0x2b0 [ 349.947793][ T4904] ? __pfx___device_attach_driver+0x10/0x10 [ 349.948018][ T4904] bus_for_each_drv+0x107/0x1a0 [ 349.948203][ T4904] ? __pfx_bus_for_each_drv+0x10/0x10 [ 349.948382][ T4904] ? bus_to_subsys+0xd5/0x110 [ 349.948559][ T4904] ? __pfx___lock_release+0x10/0x10 [ 349.948738][ T4904] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 349.948919][ T4904] __device_attach+0x1a3/0x3f0 [ 349.949103][ T4904] ? __pfx___device_attach+0x10/0x10 [ 349.949287][ T4904] ? bus_to_subsys+0xd5/0x110 [ 349.949467][ T4904] ? do_raw_spin_unlock+0x58/0x220 [ 349.949648][ T4904] bus_probe_device+0x133/0x180 [ 349.949827][ T4904] device_add+0x99d/0x1110 [ 349.950005][ T4904] ? __pfx_device_add+0x10/0x10 [ 349.950184][ T4904] ? __init_waitqueue_head+0xcf/0x150 [ 349.950366][ T4904] new_device_store+0x393/0x690 [netdevsim] [ 349.950599][ T4904] ? __pfx_new_device_store+0x10/0x10 [netdevsim] [ 349.950835][ T4904] ? __pfx_sysfs_kf_write+0x10/0x10 [ 349.951016][ T4904] ? sysfs_file_ops+0x11e/0x170 [ 349.951197][ T4904] ? __pfx_sysfs_kf_write+0x10/0x10 [ 349.951375][ T4904] kernfs_fop_write_iter+0x2ba/0x460 [ 349.951553][ T4904] vfs_write+0xa81/0x11e0 [ 349.951698][ T4904] ? __pfx_vfs_write+0x10/0x10 [ 349.951877][ T4904] ? __lock_release+0x103/0x460 [ 349.952065][ T4904] ? do_user_addr_fault+0x972/0xe30 [ 349.952247][ T4904] ? __pfx___up_read+0x10/0x10 [ 349.952428][ T4904] ksys_write+0xf8/0x1d0 [ 349.952563][ T4904] ? __pfx_ksys_write+0x10/0x10 [ 349.952742][ T4904] ? do_user_addr_fault+0x97c/0xe30 [ 349.952923][ T4904] do_syscall_64+0xc1/0x1d0 [ 349.953105][ T4904] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 349.953333][ T4904] RIP: 0033:0x7fa63adcbb77 [ 349.953520][ T4904] 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 [ 349.954149][ T4904] RSP: 002b:00007ffd33b20018 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 349.954434][ T4904] RAX: ffffffffffffffda RBX: 00007fa63abb1140 RCX: 00007fa63adcbb77 [ 349.954707][ T4904] RDX: 0000000000000009 RSI: 00005561b46e06c0 RDI: 0000000000000006 [ 349.954973][ T4904] RBP: 0000000000000009 R08: 0000000000000000 R09: 0000000000000000 [ 349.955241][ T4904] R10: 0000000000000002 R11: 0000000000000246 R12: 00007fa62cc69c40 [ 349.955511][ T4904] R13: 00005561b46e06c0 R14: 0000000000000006 R15: 00005561b44d7900 [ 349.955788][ T4904] [ 350.029233][ T4906] netdevsim netdevsim20318 eni20318np1: renamed from eth0