[ 12.881235][ T252] [ 12.881425][ T252] ============================================ [ 12.881627][ T252] WARNING: possible recursive locking detected [ 12.881826][ T252] 6.13.0-rc5-virtme #1 Not tainted [ 12.881988][ T252] -------------------------------------------- [ 12.882185][ T252] python3/252 is trying to acquire lock: [ 12.882343][ T252] ffffffffb59f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 12.882679][ T252] [ 12.882679][ T252] but task is already holding lock: [ 12.882914][ T252] ffffffffb59f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 12.883238][ T252] [ 12.883238][ T252] other info that might help us debug this: [ 12.883481][ T252] Possible unsafe locking scenario: [ 12.883481][ T252] [ 12.883722][ T252] CPU0 [ 12.883843][ T252] ---- [ 12.883963][ T252] lock((netdev_chain).rwsem); [ 12.884126][ T252] lock((netdev_chain).rwsem); [ 12.884289][ T252] [ 12.884289][ T252] *** DEADLOCK *** [ 12.884289][ T252] [ 12.884523][ T252] May be due to missing lock nesting notation [ 12.884523][ T252] [ 12.884786][ T252] 8 locks held by python3/252: [ 12.884954][ T252] #0: ffff88800a7443f0 (sb_writers#8){.+.+}-{0:0}, at: ksys_write+0xf8/0x1d0 [ 12.885256][ T252] #1: ffff888002485088 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x20b/0x460 [ 12.885554][ T252] #2: ffff88800955d570 (kn->active#33){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22e/0x460 [ 12.885896][ T252] #3: ffffffffc03e7628 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x12a/0x690 [netdevsim] [ 12.886288][ T252] #4: ffff888014f1d0e8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x76/0x3f0 [ 12.886584][ T252] #5: ffff888014f1ea50 (&devlink->lock_key){+.+.}-{4:4}, at: nsim_drv_probe+0xb7/0x8b0 [netdevsim] [ 12.886937][ T252] #6: ffffffffb5a07e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x46a/0xa60 [netdevsim] [ 12.887231][ T252] #7: ffffffffb59f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 12.887557][ T252] [ 12.887557][ T252] stack backtrace: [ 12.887758][ T252] CPU: 1 UID: 0 PID: 252 Comm: python3 Not tainted 6.13.0-rc5-virtme #1 [ 12.887996][ T252] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 12.888200][ T252] Call Trace: [ 12.888327][ T252] [ 12.888415][ T252] dump_stack_lvl+0x82/0xd0 [ 12.888581][ T252] print_deadlock_bug+0x40a/0x650 [ 12.888746][ T252] validate_chain+0x5bf/0xae0 [ 12.888912][ T252] ? __pfx_validate_chain+0x10/0x10 [ 12.889078][ T252] ? hlock_class+0x4e/0x130 [ 12.889238][ T252] ? mark_lock+0x38/0x3e0 [ 12.889360][ T252] __lock_acquire+0xb9a/0x1680 [ 12.889522][ T252] ? udp_tunnel_nic_netdevice_event+0xd1/0x5c0 [ 12.889745][ T252] ? really_probe+0x1df/0x920 [ 12.889913][ T252] lock_acquire.part.0+0xeb/0x330 [ 12.890078][ T252] ? blocking_notifier_call_chain+0x50/0x90 [ 12.890283][ T252] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 12.890488][ T252] ? find_held_lock+0x2c/0x110 [ 12.890654][ T252] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 12.890831][ T252] ? trace_lock_acquire+0x14c/0x1f0 [ 12.890993][ T252] ? lock_acquire+0x32/0xc0 [ 12.891153][ T252] ? blocking_notifier_call_chain+0x50/0x90 [ 12.891363][ T252] down_read+0x9f/0x340 [ 12.891489][ T252] ? blocking_notifier_call_chain+0x50/0x90 [ 12.891689][ T252] ? __pfx_down_read+0x10/0x10 [ 12.891848][ T252] ? notifier_call_chain+0xcd/0x150 [ 12.892012][ T252] blocking_notifier_call_chain+0x50/0x90 [ 12.892175][ T252] call_netdevice_notifiers+0x71/0xa0 [ 12.892339][ T252] ? __pfx_call_netdevice_notifiers+0x10/0x10 [ 12.892538][ T252] ? mutex_is_locked+0x1c/0x60 [ 12.892700][ T252] udp_tunnel_nic_register+0x591/0x870 [ 12.892860][ T252] udp_tunnel_nic_netdevice_event+0x11d/0x5c0 [ 12.893078][ T252] notifier_call_chain+0xcd/0x150 [ 12.893245][ T252] blocking_notifier_call_chain+0x66/0x90 [ 12.893409][ T252] register_netdevice+0xe75/0x1360 [ 12.893580][ T252] ? __pfx_register_netdevice+0x10/0x10 [ 12.893744][ T252] nsim_create+0x6c2/0xa60 [netdevsim] [ 12.893917][ T252] __nsim_dev_port_add+0x22f/0x6e0 [netdevsim] [ 12.894130][ T252] ? mark_lock+0x38/0x3e0 [ 12.894256][ T252] ? __pfx___nsim_dev_port_add+0x10/0x10 [netdevsim] [ 12.894468][ T252] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 12.894676][ T252] nsim_dev_port_add_all+0x39/0xf0 [netdevsim] [ 12.894901][ T252] nsim_drv_probe+0x61e/0x8b0 [netdevsim] [ 12.895072][ T252] ? __pfx_nsim_drv_probe+0x10/0x10 [netdevsim] [ 12.895279][ T252] ? kernfs_create_link+0x173/0x240 [ 12.895439][ T252] ? kernfs_put+0x1c/0x40 [ 12.895564][ T252] ? sysfs_do_create_link_sd+0x8c/0x100 [ 12.895756][ T252] really_probe+0x1df/0x920 [ 12.895924][ T252] __driver_probe_device+0x2e6/0x3e0 [ 12.896090][ T252] driver_probe_device+0x49/0x140 [ 12.896258][ T252] __device_attach_driver+0x192/0x2b0 [ 12.896423][ T252] ? __pfx___device_attach_driver+0x10/0x10 [ 12.896627][ T252] bus_for_each_drv+0x107/0x1a0 [ 12.896792][ T252] ? __pfx_bus_for_each_drv+0x10/0x10 [ 12.896970][ T252] ? bus_to_subsys+0xd5/0x110 [ 12.897130][ T252] ? __pfx___lock_release+0x10/0x10 [ 12.897290][ T252] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 12.897453][ T252] __device_attach+0x1a3/0x3f0 [ 12.897614][ T252] ? __pfx___device_attach+0x10/0x10 [ 12.897774][ T252] ? bus_to_subsys+0xd5/0x110 [ 12.897933][ T252] ? do_raw_spin_unlock+0x58/0x220 [ 12.898210][ T252] bus_probe_device+0x133/0x180 [ 12.898370][ T252] device_add+0x99d/0x1110 [ 12.898530][ T252] ? __pfx_device_add+0x10/0x10 [ 12.898690][ T252] ? __init_waitqueue_head+0xcf/0x150 [ 12.898960][ T252] new_device_store+0x393/0x690 [netdevsim] [ 12.899191][ T252] ? __pfx_new_device_store+0x10/0x10 [netdevsim] [ 12.899411][ T252] ? __pfx_sysfs_kf_write+0x10/0x10 [ 12.899693][ T252] ? sysfs_file_ops+0x11e/0x170 [ 12.899860][ T252] ? __pfx_sysfs_kf_write+0x10/0x10 [ 12.900023][ T252] kernfs_fop_write_iter+0x2ba/0x460 [ 12.900188][ T252] vfs_write+0xa81/0x11e0 [ 12.900420][ T252] ? __pfx_vfs_write+0x10/0x10 [ 12.900586][ T252] ? __lock_release+0x103/0x460 [ 12.900750][ T252] ? do_user_addr_fault+0x972/0xe30 [ 12.900917][ T252] ? __pfx___up_read+0x10/0x10 [ 12.901189][ T252] ksys_write+0xf8/0x1d0 [ 12.901314][ T252] ? __pfx_ksys_write+0x10/0x10 [ 12.901478][ T252] ? do_user_addr_fault+0x97c/0xe30 [ 12.901644][ T252] do_syscall_64+0xc1/0x1d0 [ 12.901811][ T252] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 12.902121][ T252] RIP: 0033:0x7ff7b5f27b77 [ 12.902293][ 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 [ 12.902983][ T252] RSP: 002b:00007ffebfddd7b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 12.903230][ T252] RAX: ffffffffffffffda RBX: 00007ff7b5d0d140 RCX: 00007ff7b5f27b77 [ 12.903580][ T252] RDX: 0000000000000009 RSI: 000055818ef2c6d0 RDI: 0000000000000005 [ 12.903828][ T252] RBP: 0000000000000009 R08: 0000000000000000 R09: 0000000000000000 [ 12.904072][ T252] R10: 0000000000000002 R11: 0000000000000246 R12: 00007ff7a7b90040 [ 12.904430][ T252] R13: 000055818ef2c6d0 R14: 0000000000000005 R15: 000055818ea7c910 [ 12.904672][ T252] [ 12.986354][ T257] netdevsim netdevsim11232 eni11232np1: renamed from eth0 [ 21.108732][ T340] netdevsim netdevsim7738 eni7738np1: renamed from eth0 [ 43.961043][ T539] netdevsim netdevsim7738 eni7738np1: set_features() failed (-16); wanted 0x041c000080014869, left 0x041e000080014869 [ 45.874840][ T550] netdevsim netdevsim12460 eni12460np1: renamed from eth0 [ 54.070844][ T629] netdevsim netdevsim16060 eni16060np1: renamed from eth0 [ 70.163874][ T762] netdevsim netdevsim4029 eni4029np1: renamed from eth0 [ 80.774882][ T843] netdevsim netdevsim31495 eni31495np1: renamed from eth0 [ 89.899736][ T957] netdevsim netdevsim8577 eni8577np1: renamed from eth0 [ 98.901682][ T1050] netdevsim netdevsim2162 eni2162np1: renamed from eth0 [ 113.918737][ T1172] netdevsim netdevsim5556 eni5556np1: renamed from eth0 [ 128.005307][ T1256] netdevsim netdevsim6109 eni6109np1: renamed from eth0 [ 144.801603][ T1386] netdevsim netdevsim17864 eni17864np1: renamed from eth0 [ 152.329389][ T1465] netdevsim netdevsim20084 eni20084np1: renamed from eth0 [ 159.643411][ T1543] netdevsim netdevsim16327 eni16327np1: renamed from eth0 [ 166.631711][ T1618] netdevsim netdevsim20855 eni20855np1: renamed from eth0 [ 166.647128][ T1623] netdevsim netdevsim20855 eni20855np3: renamed from eth2 [ 166.763402][ T1620] netdevsim netdevsim20855 eni20855np2: renamed from eth1