[ 10.579567][ T252] [ 10.579762][ T252] ============================================ [ 10.579984][ T252] WARNING: possible recursive locking detected [ 10.580207][ T252] 6.13.0-rc5-virtme #1 Not tainted [ 10.580381][ T252] -------------------------------------------- [ 10.580594][ T252] python3/252 is trying to acquire lock: [ 10.580764][ T252] ffffffff91df6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 10.581135][ T252] [ 10.581135][ T252] but task is already holding lock: [ 10.581390][ T252] ffffffff91df6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 10.581748][ T252] [ 10.581748][ T252] other info that might help us debug this: [ 10.582008][ T252] Possible unsafe locking scenario: [ 10.582008][ T252] [ 10.582263][ T252] CPU0 [ 10.582399][ T252] ---- [ 10.582534][ T252] lock((netdev_chain).rwsem); [ 10.582708][ T252] lock((netdev_chain).rwsem); [ 10.582882][ T252] [ 10.582882][ T252] *** DEADLOCK *** [ 10.582882][ T252] [ 10.583139][ T252] May be due to missing lock nesting notation [ 10.583139][ T252] [ 10.583393][ T252] 8 locks held by python3/252: [ 10.583567][ T252] #0: ffff88800acd43f0 (sb_writers#8){.+.+}-{0:0}, at: ksys_write+0xf8/0x1d0 [ 10.583886][ T252] #1: ffff888004f0be88 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x20b/0x460 [ 10.584196][ T252] #2: ffff8880097de7f0 (kn->active#33){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22e/0x460 [ 10.584549][ T252] #3: ffffffffc0213628 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x12a/0x690 [netdevsim] [ 10.584964][ T252] #4: ffff88800e1308e8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x76/0x3f0 [ 10.585283][ T252] #5: ffff88800e136a50 (&devlink->lock_key){+.+.}-{4:4}, at: nsim_drv_probe+0xb7/0x8b0 [netdevsim] [ 10.585647][ T252] #6: ffffffff91e07e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x46a/0xa60 [netdevsim] [ 10.585970][ T252] #7: ffffffff91df6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 10.586327][ T252] [ 10.586327][ T252] stack backtrace: [ 10.586544][ T252] CPU: 2 UID: 0 PID: 252 Comm: python3 Not tainted 6.13.0-rc5-virtme #1 [ 10.586808][ T252] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 10.587028][ T252] Call Trace: [ 10.587161][ T252] [ 10.587252][ T252] dump_stack_lvl+0x82/0xd0 [ 10.587437][ T252] print_deadlock_bug+0x40a/0x650 [ 10.587616][ T252] validate_chain+0x5bf/0xae0 [ 10.587794][ T252] ? __pfx_validate_chain+0x10/0x10 [ 10.587972][ T252] ? hlock_class+0x4e/0x130 [ 10.588150][ T252] ? mark_lock+0x38/0x3e0 [ 10.588287][ T252] __lock_acquire+0xb9a/0x1680 [ 10.588463][ T252] ? udp_tunnel_nic_netdevice_event+0xd1/0x5c0 [ 10.588683][ T252] ? really_probe+0x1df/0x920 [ 10.588866][ T252] lock_acquire.part.0+0xeb/0x330 [ 10.589042][ T252] ? blocking_notifier_call_chain+0x50/0x90 [ 10.589262][ T252] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 10.589482][ T252] ? find_held_lock+0x2c/0x110 [ 10.589658][ T252] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 10.589832][ T252] ? trace_lock_acquire+0x14c/0x1f0 [ 10.590009][ T252] ? lock_acquire+0x32/0xc0 [ 10.590190][ T252] ? blocking_notifier_call_chain+0x50/0x90 [ 10.590410][ T252] down_read+0x9f/0x340 [ 10.590545][ T252] ? blocking_notifier_call_chain+0x50/0x90 [ 10.590766][ T252] ? __pfx_down_read+0x10/0x10 [ 10.590944][ T252] ? notifier_call_chain+0xcd/0x150 [ 10.591122][ T252] blocking_notifier_call_chain+0x50/0x90 [ 10.591297][ T252] call_netdevice_notifiers+0x71/0xa0 [ 10.591478][ T252] ? __pfx_call_netdevice_notifiers+0x10/0x10 [ 10.591696][ T252] ? mutex_is_locked+0x1c/0x60 [ 10.591871][ T252] udp_tunnel_nic_register+0x591/0x870 [ 10.592046][ T252] udp_tunnel_nic_netdevice_event+0x11d/0x5c0 [ 10.592265][ T252] notifier_call_chain+0xcd/0x150 [ 10.592442][ T252] blocking_notifier_call_chain+0x66/0x90 [ 10.592621][ T252] register_netdevice+0xe75/0x1360 [ 10.592797][ T252] ? __pfx_register_netdevice+0x10/0x10 [ 10.592977][ T252] nsim_create+0x6c2/0xa60 [netdevsim] [ 10.593167][ T252] __nsim_dev_port_add+0x22f/0x6e0 [netdevsim] [ 10.593393][ T252] ? mark_lock+0x38/0x3e0 [ 10.593526][ T252] ? __pfx___nsim_dev_port_add+0x10/0x10 [netdevsim] [ 10.593754][ T252] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 10.593977][ T252] nsim_dev_port_add_all+0x39/0xf0 [netdevsim] [ 10.594212][ T252] nsim_drv_probe+0x61e/0x8b0 [netdevsim] [ 10.594399][ T252] ? __pfx_nsim_drv_probe+0x10/0x10 [netdevsim] [ 10.594627][ T252] ? kernfs_create_link+0x173/0x240 [ 10.594802][ T252] ? kernfs_put+0x1c/0x40 [ 10.594938][ T252] ? sysfs_do_create_link_sd+0x8c/0x100 [ 10.595120][ T252] really_probe+0x1df/0x920 [ 10.595303][ T252] __driver_probe_device+0x2e6/0x3e0 [ 10.595479][ T252] driver_probe_device+0x49/0x140 [ 10.595656][ T252] __device_attach_driver+0x192/0x2b0 [ 10.595833][ T252] ? __pfx___device_attach_driver+0x10/0x10 [ 10.596052][ T252] bus_for_each_drv+0x107/0x1a0 [ 10.596228][ T252] ? __pfx_bus_for_each_drv+0x10/0x10 [ 10.596407][ T252] ? bus_to_subsys+0xd5/0x110 [ 10.596583][ T252] ? __pfx___lock_release+0x10/0x10 [ 10.596758][ T252] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 10.596935][ T252] __device_attach+0x1a3/0x3f0 [ 10.597112][ T252] ? __pfx___device_attach+0x10/0x10 [ 10.597288][ T252] ? bus_to_subsys+0xd5/0x110 [ 10.597468][ T252] ? do_raw_spin_unlock+0x58/0x220 [ 10.597648][ T252] bus_probe_device+0x133/0x180 [ 10.597823][ T252] device_add+0x99d/0x1110 [ 10.598000][ T252] ? __pfx_device_add+0x10/0x10 [ 10.598179][ T252] ? __init_waitqueue_head+0xcf/0x150 [ 10.598356][ T252] new_device_store+0x393/0x690 [netdevsim] [ 10.598584][ T252] ? __pfx_new_device_store+0x10/0x10 [netdevsim] [ 10.598814][ T252] ? __pfx_sysfs_kf_write+0x10/0x10 [ 10.598990][ T252] ? sysfs_file_ops+0x11e/0x170 [ 10.599167][ T252] ? __pfx_sysfs_kf_write+0x10/0x10 [ 10.599341][ T252] kernfs_fop_write_iter+0x2ba/0x460 [ 10.599521][ T252] vfs_write+0xa81/0x11e0 [ 10.599655][ T252] ? __pfx_vfs_write+0x10/0x10 [ 10.599831][ T252] ? __lock_release+0x103/0x460 [ 10.600007][ T252] ? do_user_addr_fault+0x972/0xe30 [ 10.600191][ T252] ? __pfx___up_read+0x10/0x10 [ 10.600368][ T252] ksys_write+0xf8/0x1d0 [ 10.600503][ T252] ? __pfx_ksys_write+0x10/0x10 [ 10.600678][ T252] ? do_user_addr_fault+0x97c/0xe30 [ 10.600857][ T252] do_syscall_64+0xc1/0x1d0 [ 10.601032][ T252] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 10.601248][ T252] RIP: 0033:0x7f6eed3a5b77 [ 10.601426][ 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.602044][ T252] RSP: 002b:00007ffd9158b7d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 10.602310][ T252] RAX: ffffffffffffffda RBX: 00007f6eed18b140 RCX: 00007f6eed3a5b77 [ 10.602570][ T252] RDX: 0000000000000007 RSI: 0000555fe1a83680 RDI: 0000000000000006 [ 10.602834][ T252] RBP: 0000000000000007 R08: 0000000000000000 R09: 0000000000000000 [ 10.603097][ T252] R10: 0000000000000002 R11: 0000000000000246 R12: 00007f6edf242c40 [ 10.603357][ T252] R13: 0000555fe1a83680 R14: 0000000000000006 R15: 0000555fe187a900 [ 10.603621][ T252] [ 10.664201][ T254] netdevsim netdevsim756 eni756np1: renamed from eth0 [ 13.022484][ T252] python3 (252) used greatest stack depth: 24312 bytes left