[ 19.809052][ T429] [ 19.809187][ T429] ============================================ [ 19.809397][ T429] WARNING: possible recursive locking detected [ 19.809601][ T429] 6.13.0-rc5-virtme #1 Not tainted [ 19.809783][ T429] -------------------------------------------- [ 19.809990][ T429] python3/429 is trying to acquire lock: [ 19.810153][ T429] ffffffffba7f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 19.810490][ T429] [ 19.810490][ T429] but task is already holding lock: [ 19.810730][ T429] ffffffffba7f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 19.811057][ T429] [ 19.811057][ T429] other info that might help us debug this: [ 19.811296][ T429] Possible unsafe locking scenario: [ 19.811296][ T429] [ 19.811535][ T429] CPU0 [ 19.811656][ T429] ---- [ 19.811778][ T429] lock((netdev_chain).rwsem); [ 19.811944][ T429] lock((netdev_chain).rwsem); [ 19.812107][ T429] [ 19.812107][ T429] *** DEADLOCK *** [ 19.812107][ T429] [ 19.812354][ T429] May be due to missing lock nesting notation [ 19.812354][ T429] [ 19.812590][ T429] 8 locks held by python3/429: [ 19.812753][ T429] #0: ffff88800a4e93f0 (sb_writers#8){.+.+}-{0:0}, at: ksys_write+0xf8/0x1d0 [ 19.813049][ T429] #1: ffff88800a691a88 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x20b/0x460 [ 19.813346][ T429] #2: ffff88800964d9f0 (kn->active#33){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22e/0x460 [ 19.813673][ T429] #3: ffffffffc0508628 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x12a/0x690 [netdevsim] [ 19.814055][ T429] #4: ffff88800c9168e8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x76/0x3f0 [ 19.814346][ T429] #5: ffff88800c913a50 (&devlink->lock_key){+.+.}-{4:4}, at: nsim_drv_probe+0xb7/0x8b0 [netdevsim] [ 19.814690][ T429] #6: ffffffffba807e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x46a/0xa60 [netdevsim] [ 19.814989][ T429] #7: ffffffffba7f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 19.815319][ T429] [ 19.815319][ T429] stack backtrace: [ 19.815520][ T429] CPU: 2 UID: 0 PID: 429 Comm: python3 Not tainted 6.13.0-rc5-virtme #1 [ 19.815772][ T429] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 19.815975][ T429] Call Trace: [ 19.816100][ T429] [ 19.816185][ T429] dump_stack_lvl+0x82/0xd0 [ 19.816355][ T429] print_deadlock_bug+0x40a/0x650 [ 19.816521][ T429] validate_chain+0x5bf/0xae0 [ 19.816688][ T429] ? __pfx_validate_chain+0x10/0x10 [ 19.816855][ T429] ? hlock_class+0x4e/0x130 [ 19.817019][ T429] ? mark_lock+0x38/0x3e0 [ 19.817143][ T429] __lock_acquire+0xb9a/0x1680 [ 19.817307][ T429] ? udp_tunnel_nic_netdevice_event+0xd1/0x5c0 [ 19.817513][ T429] ? really_probe+0x1df/0x920 [ 19.817678][ T429] lock_acquire.part.0+0xeb/0x330 [ 19.817840][ T429] ? blocking_notifier_call_chain+0x50/0x90 [ 19.818043][ T429] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 19.818250][ T429] ? find_held_lock+0x2c/0x110 [ 19.818412][ T429] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 19.818575][ T429] ? trace_lock_acquire+0x14c/0x1f0 [ 19.818738][ T429] ? lock_acquire+0x32/0xc0 [ 19.818899][ T429] ? blocking_notifier_call_chain+0x50/0x90 [ 19.819101][ T429] down_read+0x9f/0x340 [ 19.819227][ T429] ? blocking_notifier_call_chain+0x50/0x90 [ 19.819433][ T429] ? __pfx_down_read+0x10/0x10 [ 19.819597][ T429] ? notifier_call_chain+0xcd/0x150 [ 19.819768][ T429] blocking_notifier_call_chain+0x50/0x90 [ 19.819932][ T429] call_netdevice_notifiers+0x71/0xa0 [ 19.820096][ T429] ? __pfx_call_netdevice_notifiers+0x10/0x10 [ 19.820298][ T429] ? mutex_is_locked+0x1c/0x60 [ 19.820467][ T429] udp_tunnel_nic_register+0x591/0x870 [ 19.820631][ T429] udp_tunnel_nic_netdevice_event+0x11d/0x5c0 [ 19.820842][ T429] notifier_call_chain+0xcd/0x150 [ 19.821007][ T429] blocking_notifier_call_chain+0x66/0x90 [ 19.821171][ T429] register_netdevice+0xe75/0x1360 [ 19.821336][ T429] ? __pfx_register_netdevice+0x10/0x10 [ 19.821501][ T429] nsim_create+0x6c2/0xa60 [netdevsim] [ 19.821678][ T429] __nsim_dev_port_add+0x22f/0x6e0 [netdevsim] [ 19.821892][ T429] ? mark_lock+0x38/0x3e0 [ 19.822016][ T429] ? __pfx___nsim_dev_port_add+0x10/0x10 [netdevsim] [ 19.822229][ T429] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 19.822434][ T429] nsim_dev_port_add_all+0x39/0xf0 [netdevsim] [ 19.822647][ T429] nsim_drv_probe+0x61e/0x8b0 [netdevsim] [ 19.822829][ T429] ? __pfx_nsim_drv_probe+0x10/0x10 [netdevsim] [ 19.823041][ T429] ? kernfs_create_link+0x173/0x240 [ 19.823208][ T429] ? kernfs_put+0x1c/0x40 [ 19.823335][ T429] ? sysfs_do_create_link_sd+0x8c/0x100 [ 19.823503][ T429] really_probe+0x1df/0x920 [ 19.823669][ T429] __driver_probe_device+0x2e6/0x3e0 [ 19.823832][ T429] driver_probe_device+0x49/0x140 [ 19.823998][ T429] __device_attach_driver+0x192/0x2b0 [ 19.824162][ T429] ? __pfx___device_attach_driver+0x10/0x10 [ 19.824364][ T429] bus_for_each_drv+0x107/0x1a0 [ 19.824529][ T429] ? __pfx_bus_for_each_drv+0x10/0x10 [ 19.824691][ T429] ? bus_to_subsys+0xd5/0x110 [ 19.824853][ T429] ? __pfx___lock_release+0x10/0x10 [ 19.825016][ T429] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 19.825186][ T429] __device_attach+0x1a3/0x3f0 [ 19.825349][ T429] ? __pfx___device_attach+0x10/0x10 [ 19.825512][ T429] ? bus_to_subsys+0xd5/0x110 [ 19.825678][ T429] ? do_raw_spin_unlock+0x58/0x220 [ 19.825843][ T429] bus_probe_device+0x133/0x180 [ 19.826006][ T429] device_add+0x99d/0x1110 [ 19.826166][ T429] ? __pfx_device_add+0x10/0x10 [ 19.826331][ T429] ? __init_waitqueue_head+0xcf/0x150 [ 19.826497][ T429] new_device_store+0x393/0x690 [netdevsim] [ 19.826710][ T429] ? __pfx_new_device_store+0x10/0x10 [netdevsim] [ 19.826921][ T429] ? __pfx_sysfs_kf_write+0x10/0x10 [ 19.827082][ T429] ? sysfs_file_ops+0x11e/0x170 [ 19.827247][ T429] ? __pfx_sysfs_kf_write+0x10/0x10 [ 19.827408][ T429] kernfs_fop_write_iter+0x2ba/0x460 [ 19.827576][ T429] vfs_write+0xa81/0x11e0 [ 19.827699][ T429] ? __pfx_vfs_write+0x10/0x10 [ 19.827862][ T429] ? __lock_release+0x103/0x460 [ 19.828024][ T429] ? do_user_addr_fault+0x972/0xe30 [ 19.828190][ T429] ? __pfx___up_read+0x10/0x10 [ 19.828359][ T429] ksys_write+0xf8/0x1d0 [ 19.828483][ T429] ? __pfx_ksys_write+0x10/0x10 [ 19.828645][ T429] ? do_user_addr_fault+0x97c/0xe30 [ 19.828809][ T429] do_syscall_64+0xc1/0x1d0 [ 19.828977][ T429] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 19.829182][ T429] RIP: 0033:0x7f4d50962b77 [ 19.829351][ T429] 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 [ 19.829935][ T429] RSP: 002b:00007ffcfac23028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 19.830181][ T429] RAX: ffffffffffffffda RBX: 00007f4d50748140 RCX: 00007f4d50962b77 [ 19.830426][ T429] RDX: 0000000000000009 RSI: 000055f54c81e680 RDI: 0000000000000006 [ 19.830670][ T429] RBP: 0000000000000009 R08: 0000000000000000 R09: 0000000000000000 [ 19.830917][ T429] R10: 0000000000000002 R11: 0000000000000246 R12: 00007f4d42800c40 [ 19.831163][ T429] R13: 000055f54c81e680 R14: 0000000000000006 R15: 000055f54c615900 [ 19.831409][ T429] [ 19.889787][ T431] netdevsim netdevsim25725 eni25725np1: renamed from eth0