[ 9.903738][ T249] [ 9.903936][ T249] ============================================ [ 9.904174][ T249] WARNING: possible recursive locking detected [ 9.904403][ T249] 6.13.0-rc5-virtme #1 Not tainted [ 9.904588][ T249] -------------------------------------------- [ 9.904810][ T249] busy_poll_test./249 is trying to acquire lock: [ 9.905039][ T249] ffffffffa75f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 9.905410][ T249] [ 9.905410][ T249] but task is already holding lock: [ 9.905678][ T249] ffffffffa75f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 9.906034][ T249] [ 9.906034][ T249] other info that might help us debug this: [ 9.906302][ T249] Possible unsafe locking scenario: [ 9.906302][ T249] [ 9.906568][ T249] CPU0 [ 9.906708][ T249] ---- [ 9.906860][ T249] lock((netdev_chain).rwsem); [ 9.907041][ T249] lock((netdev_chain).rwsem); [ 9.907223][ T249] [ 9.907223][ T249] *** DEADLOCK *** [ 9.907223][ T249] [ 9.907483][ T249] May be due to missing lock nesting notation [ 9.907483][ T249] [ 9.907754][ T249] 8 locks held by busy_poll_test./249: [ 9.907940][ T249] #0: ffff88800a12c3f0 (sb_writers#7){.+.+}-{0:0}, at: ksys_write+0xf8/0x1d0 [ 9.908268][ T249] #1: ffff88800ba44a88 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x20b/0x460 [ 9.908588][ T249] #2: ffff88800582f690 (kn->active#33){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22e/0x460 [ 9.908950][ T249] #3: ffffffffc04e8628 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x12a/0x690 [netdevsim] [ 9.909374][ T249] #4: ffff8880092e88e8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x76/0x3f0 [ 9.909695][ T249] #5: ffff8880092ea250 (&devlink->lock_key){+.+.}-{4:4}, at: nsim_drv_probe+0xb7/0x8b0 [netdevsim] [ 9.910068][ T249] #6: ffffffffa7607e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x46a/0xa60 [netdevsim] [ 9.910396][ T249] #7: ffffffffa75f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 9.910754][ T249] [ 9.910754][ T249] stack backtrace: [ 9.910970][ T249] CPU: 3 UID: 0 PID: 249 Comm: busy_poll_test. Not tainted 6.13.0-rc5-virtme #1 [ 9.911287][ T249] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 9.911509][ T249] Call Trace: [ 9.911651][ T249] [ 9.911744][ T249] dump_stack_lvl+0x82/0xd0 [ 9.911929][ T249] print_deadlock_bug+0x40a/0x650 [ 9.912114][ T249] validate_chain+0x5bf/0xae0 [ 9.912296][ T249] ? __pfx_validate_chain+0x10/0x10 [ 9.912481][ T249] ? hlock_class+0x4e/0x130 [ 9.912657][ T249] ? mark_lock+0x38/0x3e0 [ 9.912791][ T249] __lock_acquire+0xb9a/0x1680 [ 9.912971][ T249] ? udp_tunnel_nic_netdevice_event+0xd1/0x5c0 [ 9.913194][ T249] ? really_probe+0x1df/0x920 [ 9.913373][ T249] lock_acquire.part.0+0xeb/0x330 [ 9.913549][ T249] ? blocking_notifier_call_chain+0x50/0x90 [ 9.913768][ T249] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 9.913989][ T249] ? find_held_lock+0x2c/0x110 [ 9.914163][ T249] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 9.914342][ T249] ? trace_lock_acquire+0x14c/0x1f0 [ 9.914523][ T249] ? lock_acquire+0x32/0xc0 [ 9.914703][ T249] ? blocking_notifier_call_chain+0x50/0x90 [ 9.914926][ T249] down_read+0x9f/0x340 [ 9.915061][ T249] ? blocking_notifier_call_chain+0x50/0x90 [ 9.915283][ T249] ? __pfx_down_read+0x10/0x10 [ 9.915468][ T249] ? notifier_call_chain+0xcd/0x150 [ 9.915649][ T249] blocking_notifier_call_chain+0x50/0x90 [ 9.915832][ T249] call_netdevice_notifiers+0x71/0xa0 [ 9.916011][ T249] ? __pfx_call_netdevice_notifiers+0x10/0x10 [ 9.916232][ T249] ? mutex_is_locked+0x1c/0x60 [ 9.916411][ T249] udp_tunnel_nic_register+0x591/0x870 [ 9.916589][ T249] udp_tunnel_nic_netdevice_event+0x11d/0x5c0 [ 9.916811][ T249] notifier_call_chain+0xcd/0x150 [ 9.916991][ T249] blocking_notifier_call_chain+0x66/0x90 [ 9.917170][ T249] register_netdevice+0xe75/0x1360 [ 9.917346][ T249] ? __pfx_register_netdevice+0x10/0x10 [ 9.917534][ T249] nsim_create+0x6c2/0xa60 [netdevsim] [ 9.917722][ T249] __nsim_dev_port_add+0x22f/0x6e0 [netdevsim] [ 9.917949][ T249] ? mark_lock+0x38/0x3e0 [ 9.918081][ T249] ? __pfx___nsim_dev_port_add+0x10/0x10 [netdevsim] [ 9.918316][ T249] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 9.918536][ T249] nsim_dev_port_add_all+0x39/0xf0 [netdevsim] [ 9.918775][ T249] nsim_drv_probe+0x61e/0x8b0 [netdevsim] [ 9.918966][ T249] ? __pfx_nsim_drv_probe+0x10/0x10 [netdevsim] [ 9.919193][ T249] ? kernfs_create_link+0x173/0x240 [ 9.919370][ T249] ? kernfs_put+0x1c/0x40 [ 9.919508][ T249] ? sysfs_do_create_link_sd+0x8c/0x100 [ 9.919687][ T249] really_probe+0x1df/0x920 [ 9.919879][ T249] __driver_probe_device+0x2e6/0x3e0 [ 9.920056][ T249] driver_probe_device+0x49/0x140 [ 9.920232][ T249] __device_attach_driver+0x192/0x2b0 [ 9.920411][ T249] ? __pfx___device_attach_driver+0x10/0x10 [ 9.920631][ T249] bus_for_each_drv+0x107/0x1a0 [ 9.920811][ T249] ? __pfx_bus_for_each_drv+0x10/0x10 [ 9.920987][ T249] ? bus_to_subsys+0xd5/0x110 [ 9.921166][ T249] ? __pfx___lock_release+0x10/0x10 [ 9.921344][ T249] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 9.921521][ T249] __device_attach+0x1a3/0x3f0 [ 9.921699][ T249] ? __pfx___device_attach+0x10/0x10 [ 9.921876][ T249] ? bus_to_subsys+0xd5/0x110 [ 9.922054][ T249] ? do_raw_spin_unlock+0x58/0x220 [ 9.922236][ T249] bus_probe_device+0x133/0x180 [ 9.922414][ T249] device_add+0x99d/0x1110 [ 9.922592][ T249] ? __pfx_device_add+0x10/0x10 [ 9.922769][ T249] ? __init_waitqueue_head+0xcf/0x150 [ 9.922949][ T249] new_device_store+0x393/0x690 [netdevsim] [ 9.923182][ T249] ? __pfx_new_device_store+0x10/0x10 [netdevsim] [ 9.923418][ T249] ? __pfx_sysfs_kf_write+0x10/0x10 [ 9.923594][ T249] ? sysfs_file_ops+0x11e/0x170 [ 9.923770][ T249] ? __pfx_sysfs_kf_write+0x10/0x10 [ 9.923950][ T249] kernfs_fop_write_iter+0x2ba/0x460 [ 9.924132][ T249] vfs_write+0xa81/0x11e0 [ 9.924267][ T249] ? __pfx_vfs_write+0x10/0x10 [ 9.924442][ T249] ? __lock_release+0x103/0x460 [ 9.924620][ T249] ? do_user_addr_fault+0x972/0xe30 [ 9.924802][ T249] ? __pfx___up_read+0x10/0x10 [ 9.924979][ T249] ksys_write+0xf8/0x1d0 [ 9.925113][ T249] ? __pfx_ksys_write+0x10/0x10 [ 9.925290][ T249] ? do_user_addr_fault+0x97c/0xe30 [ 9.925467][ T249] do_syscall_64+0xc1/0x1d0 [ 9.925644][ T249] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 9.925861][ T249] RIP: 0033:0x7fb2890c7b77 [ 9.926045][ T249] 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 [ 9.926671][ T249] RSP: 002b:00007fffdb92e9d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 9.926937][ T249] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fb2890c7b77 [ 9.927204][ T249] RDX: 0000000000000004 RSI: 00005634a0dd4f80 RDI: 0000000000000001 [ 9.927467][ T249] RBP: 00005634a0dd4f80 R08: 0000000000000003 R09: 0000000000000000 [ 9.927729][ T249] R10: 0000000000000020 R11: 0000000000000246 R12: 0000000000000004 [ 9.927991][ T249] R13: 00007fb289183760 R14: 0000000000000004 R15: 00007fb28917e9c0 [ 9.928263][ T249] [ 10.016762][ T255] netdevsim netdevsim337 eni337np1: renamed from eth0 [ 10.098159][ T254] netdevsim netdevsim580 eni580np1: renamed from eth1