[ 117.231112][ T1822] [ 117.231305][ T1822] ============================================ [ 117.231519][ T1822] WARNING: possible recursive locking detected [ 117.231732][ T1822] 6.13.0-rc5-virtme #1 Not tainted [ 117.231904][ T1822] -------------------------------------------- [ 117.232108][ T1822] busy_poll_test./1822 is trying to acquire lock: [ 117.232314][ T1822] ffffffffbd1f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 117.232651][ T1822] [ 117.232651][ T1822] but task is already holding lock: [ 117.232892][ T1822] ffffffffbd1f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 117.233226][ T1822] [ 117.233226][ T1822] other info that might help us debug this: [ 117.233470][ T1822] Possible unsafe locking scenario: [ 117.233470][ T1822] [ 117.233713][ T1822] CPU0 [ 117.233839][ T1822] ---- [ 117.233962][ T1822] lock((netdev_chain).rwsem); [ 117.234126][ T1822] lock((netdev_chain).rwsem); [ 117.234290][ T1822] [ 117.234290][ T1822] *** DEADLOCK *** [ 117.234290][ T1822] [ 117.234533][ T1822] May be due to missing lock nesting notation [ 117.234533][ T1822] [ 117.234773][ T1822] 8 locks held by busy_poll_test./1822: [ 117.234945][ T1822] #0: ffff88800a5d43f0 (sb_writers#8){.+.+}-{0:0}, at: ksys_write+0xf8/0x1d0 [ 117.235241][ T1822] #1: ffff888009736888 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x20b/0x460 [ 117.235534][ T1822] #2: ffff8880102dec70 (kn->active#33){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22e/0x460 [ 117.235876][ T1822] #3: ffffffffc067b628 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x12a/0x690 [netdevsim] [ 117.236281][ T1822] #4: ffff8880096250e8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x76/0x3f0 [ 117.236597][ T1822] #5: ffff888009cdea50 (&devlink->lock_key){+.+.}-{4:4}, at: nsim_drv_probe+0xb7/0x8b0 [netdevsim] [ 117.236943][ T1822] #6: ffffffffbd207e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x46a/0xa60 [netdevsim] [ 117.237246][ T1822] #7: ffffffffbd1f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 117.237598][ T1822] [ 117.237598][ T1822] stack backtrace: [ 117.237810][ T1822] CPU: 0 UID: 0 PID: 1822 Comm: busy_poll_test. Not tainted 6.13.0-rc5-virtme #1 [ 117.238103][ T1822] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 117.238321][ T1822] Call Trace: [ 117.238453][ T1822] [ 117.238539][ T1822] dump_stack_lvl+0x82/0xd0 [ 117.238711][ T1822] print_deadlock_bug+0x40a/0x650 [ 117.238894][ T1822] validate_chain+0x5bf/0xae0 [ 117.239061][ T1822] ? __pfx_validate_chain+0x10/0x10 [ 117.239227][ T1822] ? hlock_class+0x4e/0x130 [ 117.239404][ T1822] ? mark_lock+0x38/0x3e0 [ 117.239531][ T1822] __lock_acquire+0xb9a/0x1680 [ 117.239701][ T1822] ? udp_tunnel_nic_netdevice_event+0xd1/0x5c0 [ 117.239914][ T1822] ? really_probe+0x1df/0x920 [ 117.240082][ T1822] lock_acquire.part.0+0xeb/0x330 [ 117.240246][ T1822] ? blocking_notifier_call_chain+0x50/0x90 [ 117.240466][ T1822] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 117.240673][ T1822] ? find_held_lock+0x2c/0x110 [ 117.240836][ T1822] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 117.241025][ T1822] ? trace_lock_acquire+0x14c/0x1f0 [ 117.241203][ T1822] ? lock_acquire+0x32/0xc0 [ 117.241370][ T1822] ? blocking_notifier_call_chain+0x50/0x90 [ 117.241581][ T1822] down_read+0x9f/0x340 [ 117.241708][ T1822] ? blocking_notifier_call_chain+0x50/0x90 [ 117.241920][ T1822] ? __pfx_down_read+0x10/0x10 [ 117.242088][ T1822] ? notifier_call_chain+0xcd/0x150 [ 117.242266][ T1822] blocking_notifier_call_chain+0x50/0x90 [ 117.242442][ T1822] call_netdevice_notifiers+0x71/0xa0 [ 117.242610][ T1822] ? __pfx_call_netdevice_notifiers+0x10/0x10 [ 117.242823][ T1822] ? mutex_is_locked+0x1c/0x60 [ 117.242995][ T1822] udp_tunnel_nic_register+0x591/0x870 [ 117.243169][ T1822] udp_tunnel_nic_netdevice_event+0x11d/0x5c0 [ 117.243380][ T1822] notifier_call_chain+0xcd/0x150 [ 117.243564][ T1822] blocking_notifier_call_chain+0x66/0x90 [ 117.243735][ T1822] register_netdevice+0xe75/0x1360 [ 117.243912][ T1822] ? __pfx_register_netdevice+0x10/0x10 [ 117.244087][ T1822] nsim_create+0x6c2/0xa60 [netdevsim] [ 117.244271][ T1822] __nsim_dev_port_add+0x22f/0x6e0 [netdevsim] [ 117.244491][ T1822] ? mark_lock+0x38/0x3e0 [ 117.244619][ T1822] ? __pfx___nsim_dev_port_add+0x10/0x10 [netdevsim] [ 117.244844][ T1822] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 117.245068][ T1822] nsim_dev_port_add_all+0x39/0xf0 [netdevsim] [ 117.245297][ T1822] nsim_drv_probe+0x61e/0x8b0 [netdevsim] [ 117.245478][ T1822] ? __pfx_nsim_drv_probe+0x10/0x10 [netdevsim] [ 117.245693][ T1822] ? kernfs_create_link+0x173/0x240 [ 117.245866][ T1822] ? kernfs_put+0x1c/0x40 [ 117.246002][ T1822] ? sysfs_do_create_link_sd+0x8c/0x100 [ 117.246178][ T1822] really_probe+0x1df/0x920 [ 117.246356][ T1822] __driver_probe_device+0x2e6/0x3e0 [ 117.246530][ T1822] driver_probe_device+0x49/0x140 [ 117.246711][ T1822] __device_attach_driver+0x192/0x2b0 [ 117.246879][ T1822] ? __pfx___device_attach_driver+0x10/0x10 [ 117.247097][ T1822] bus_for_each_drv+0x107/0x1a0 [ 117.247270][ T1822] ? __pfx_bus_for_each_drv+0x10/0x10 [ 117.247441][ T1822] ? bus_to_subsys+0xd5/0x110 [ 117.247617][ T1822] ? __pfx___lock_release+0x10/0x10 [ 117.247813][ T1822] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 117.247986][ T1822] __device_attach+0x1a3/0x3f0 [ 117.248160][ T1822] ? __pfx___device_attach+0x10/0x10 [ 117.248331][ T1822] ? bus_to_subsys+0xd5/0x110 [ 117.248503][ T1822] ? do_raw_spin_unlock+0x58/0x220 [ 117.248669][ T1822] bus_probe_device+0x133/0x180 [ 117.248838][ T1822] device_add+0x99d/0x1110 [ 117.249001][ T1822] ? __pfx_device_add+0x10/0x10 [ 117.249164][ T1822] ? __init_waitqueue_head+0xcf/0x150 [ 117.249332][ T1822] new_device_store+0x393/0x690 [netdevsim] [ 117.249547][ T1822] ? __pfx_new_device_store+0x10/0x10 [netdevsim] [ 117.249764][ T1822] ? __pfx_sysfs_kf_write+0x10/0x10 [ 117.249928][ T1822] ? sysfs_file_ops+0x11e/0x170 [ 117.250093][ T1822] ? __pfx_sysfs_kf_write+0x10/0x10 [ 117.250257][ T1822] kernfs_fop_write_iter+0x2ba/0x460 [ 117.250420][ T1822] vfs_write+0xa81/0x11e0 [ 117.250545][ T1822] ? __pfx_vfs_write+0x10/0x10 [ 117.250710][ T1822] ? __lock_release+0x103/0x460 [ 117.250880][ T1822] ? do_user_addr_fault+0x972/0xe30 [ 117.251046][ T1822] ? __pfx___up_read+0x10/0x10 [ 117.251212][ T1822] ksys_write+0xf8/0x1d0 [ 117.251337][ T1822] ? __pfx_ksys_write+0x10/0x10 [ 117.251501][ T1822] ? do_user_addr_fault+0x97c/0xe30 [ 117.251671][ T1822] do_syscall_64+0xc1/0x1d0 [ 117.251844][ T1822] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 117.252047][ T1822] RIP: 0033:0x7f78345eeb77 [ 117.252221][ T1822] 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 [ 117.252800][ T1822] RSP: 002b:00007ffc126b5bf8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 117.253048][ T1822] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f78345eeb77 [ 117.253296][ T1822] RDX: 0000000000000004 RSI: 0000562fd040ff80 RDI: 0000000000000001 [ 117.253543][ T1822] RBP: 0000562fd040ff80 R08: 0000000000000003 R09: 0000000000000000 [ 117.253788][ T1822] R10: 0000000000000020 R11: 0000000000000246 R12: 0000000000000004 [ 117.254033][ T1822] R13: 00007f78346aa760 R14: 0000000000000004 R15: 00007f78346a59c0 [ 117.254289][ T1822] [ 117.341107][ T1824] netdevsim netdevsim498 eni498np1: renamed from eth0 [ 117.425898][ T1825] netdevsim netdevsim762 eni762np1: renamed from eth1