[ 30.910788][ T563] [ 30.910917][ T563] ============================================ [ 30.911122][ T563] WARNING: possible recursive locking detected [ 30.911324][ T563] 6.13.0-rc5-virtme #1 Not tainted [ 30.911490][ T563] -------------------------------------------- [ 30.911688][ T563] busy_poll_test./563 is trying to acquire lock: [ 30.911897][ T563] ffffffff9cff6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 30.912232][ T563] [ 30.912232][ T563] but task is already holding lock: [ 30.912472][ T563] ffffffff9cff6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 30.912816][ T563] [ 30.912816][ T563] other info that might help us debug this: [ 30.913060][ T563] Possible unsafe locking scenario: [ 30.913060][ T563] [ 30.913297][ T563] CPU0 [ 30.913425][ T563] ---- [ 30.913546][ T563] lock((netdev_chain).rwsem); [ 30.913707][ T563] lock((netdev_chain).rwsem); [ 30.913874][ T563] [ 30.913874][ T563] *** DEADLOCK *** [ 30.913874][ T563] [ 30.914118][ T563] May be due to missing lock nesting notation [ 30.914118][ T563] [ 30.914361][ T563] 8 locks held by busy_poll_test./563: [ 30.914526][ T563] #0: ffff88800a3213f0 (sb_writers#8){.+.+}-{0:0}, at: ksys_write+0xf8/0x1d0 [ 30.914826][ T563] #1: ffff888010105088 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x20b/0x460 [ 30.915114][ T563] #2: ffff888009431e70 (kn->active#33){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22e/0x460 [ 30.915449][ T563] #3: ffffffffc02db628 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x12a/0x690 [netdevsim] [ 30.915833][ T563] #4: ffff8880100c88e8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x76/0x3f0 [ 30.916123][ T563] #5: ffff8880100ca250 (&devlink->lock_key){+.+.}-{4:4}, at: nsim_drv_probe+0xb7/0x8b0 [netdevsim] [ 30.916458][ T563] #6: ffffffff9d007e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x46a/0xa60 [netdevsim] [ 30.916758][ T563] #7: ffffffff9cff6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 30.917091][ T563] [ 30.917091][ T563] stack backtrace: [ 30.917291][ T563] CPU: 0 UID: 0 PID: 563 Comm: busy_poll_test. Not tainted 6.13.0-rc5-virtme #1 [ 30.917578][ T563] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 30.917782][ T563] Call Trace: [ 30.917912][ T563] [ 30.917998][ T563] dump_stack_lvl+0x82/0xd0 [ 30.918170][ T563] print_deadlock_bug+0x40a/0x650 [ 30.918337][ T563] validate_chain+0x5bf/0xae0 [ 30.918502][ T563] ? __pfx_validate_chain+0x10/0x10 [ 30.918666][ T563] ? hlock_class+0x4e/0x130 [ 30.918827][ T563] ? mark_lock+0x38/0x3e0 [ 30.918952][ T563] __lock_acquire+0xb9a/0x1680 [ 30.919117][ T563] ? udp_tunnel_nic_netdevice_event+0xd1/0x5c0 [ 30.919322][ T563] ? really_probe+0x1df/0x920 [ 30.919486][ T563] lock_acquire.part.0+0xeb/0x330 [ 30.919649][ T563] ? blocking_notifier_call_chain+0x50/0x90 [ 30.919855][ T563] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 30.920057][ T563] ? find_held_lock+0x2c/0x110 [ 30.920221][ T563] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 30.920391][ T563] ? trace_lock_acquire+0x14c/0x1f0 [ 30.920556][ T563] ? lock_acquire+0x32/0xc0 [ 30.920724][ T563] ? blocking_notifier_call_chain+0x50/0x90 [ 30.920927][ T563] down_read+0x9f/0x340 [ 30.921056][ T563] ? blocking_notifier_call_chain+0x50/0x90 [ 30.921261][ T563] ? __pfx_down_read+0x10/0x10 [ 30.921425][ T563] ? notifier_call_chain+0xcd/0x150 [ 30.921600][ T563] blocking_notifier_call_chain+0x50/0x90 [ 30.921765][ T563] call_netdevice_notifiers+0x71/0xa0 [ 30.921930][ T563] ? __pfx_call_netdevice_notifiers+0x10/0x10 [ 30.922133][ T563] ? mutex_is_locked+0x1c/0x60 [ 30.922296][ T563] udp_tunnel_nic_register+0x591/0x870 [ 30.922459][ T563] udp_tunnel_nic_netdevice_event+0x11d/0x5c0 [ 30.922671][ T563] notifier_call_chain+0xcd/0x150 [ 30.922846][ T563] blocking_notifier_call_chain+0x66/0x90 [ 30.923011][ T563] register_netdevice+0xe75/0x1360 [ 30.923175][ T563] ? __pfx_register_netdevice+0x10/0x10 [ 30.923338][ T563] nsim_create+0x6c2/0xa60 [netdevsim] [ 30.923513][ T563] __nsim_dev_port_add+0x22f/0x6e0 [netdevsim] [ 30.923727][ T563] ? mark_lock+0x38/0x3e0 [ 30.923858][ T563] ? __pfx___nsim_dev_port_add+0x10/0x10 [netdevsim] [ 30.924071][ T563] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 30.924276][ T563] nsim_dev_port_add_all+0x39/0xf0 [netdevsim] [ 30.924489][ T563] nsim_drv_probe+0x61e/0x8b0 [netdevsim] [ 30.924663][ T563] ? __pfx_nsim_drv_probe+0x10/0x10 [netdevsim] [ 30.924874][ T563] ? kernfs_create_link+0x173/0x240 [ 30.925046][ T563] ? kernfs_put+0x1c/0x40 [ 30.925170][ T563] ? sysfs_do_create_link_sd+0x8c/0x100 [ 30.925335][ T563] really_probe+0x1df/0x920 [ 30.925499][ T563] __driver_probe_device+0x2e6/0x3e0 [ 30.925664][ T563] driver_probe_device+0x49/0x140 [ 30.925826][ T563] __device_attach_driver+0x192/0x2b0 [ 30.925989][ T563] ? __pfx___device_attach_driver+0x10/0x10 [ 30.926200][ T563] bus_for_each_drv+0x107/0x1a0 [ 30.926363][ T563] ? __pfx_bus_for_each_drv+0x10/0x10 [ 30.926524][ T563] ? bus_to_subsys+0xd5/0x110 [ 30.926685][ T563] ? __pfx___lock_release+0x10/0x10 [ 30.926849][ T563] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 30.927013][ T563] __device_attach+0x1a3/0x3f0 [ 30.927176][ T563] ? __pfx___device_attach+0x10/0x10 [ 30.927346][ T563] ? bus_to_subsys+0xd5/0x110 [ 30.927509][ T563] ? do_raw_spin_unlock+0x58/0x220 [ 30.927674][ T563] bus_probe_device+0x133/0x180 [ 30.927837][ T563] device_add+0x99d/0x1110 [ 30.927999][ T563] ? __pfx_device_add+0x10/0x10 [ 30.928164][ T563] ? __init_waitqueue_head+0xcf/0x150 [ 30.928332][ T563] new_device_store+0x393/0x690 [netdevsim] [ 30.928545][ T563] ? __pfx_new_device_store+0x10/0x10 [netdevsim] [ 30.928769][ T563] ? __pfx_sysfs_kf_write+0x10/0x10 [ 30.928931][ T563] ? sysfs_file_ops+0x11e/0x170 [ 30.929094][ T563] ? __pfx_sysfs_kf_write+0x10/0x10 [ 30.929257][ T563] kernfs_fop_write_iter+0x2ba/0x460 [ 30.929421][ T563] vfs_write+0xa81/0x11e0 [ 30.929546][ T563] ? __pfx_vfs_write+0x10/0x10 [ 30.929709][ T563] ? __lock_release+0x103/0x460 [ 30.929877][ T563] ? do_user_addr_fault+0x972/0xe30 [ 30.930044][ T563] ? __pfx___up_read+0x10/0x10 [ 30.930209][ T563] ksys_write+0xf8/0x1d0 [ 30.930332][ T563] ? __pfx_ksys_write+0x10/0x10 [ 30.930494][ T563] ? do_user_addr_fault+0x97c/0xe30 [ 30.930659][ T563] do_syscall_64+0xc1/0x1d0 [ 30.930825][ T563] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 30.931034][ T563] RIP: 0033:0x7fdfae785b77 [ 30.931202][ T563] 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 [ 30.931779][ T563] RSP: 002b:00007ffd2c7f81c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 30.932027][ T563] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fdfae785b77 [ 30.932283][ T563] RDX: 0000000000000004 RSI: 000055bf671ccf80 RDI: 0000000000000001 [ 30.932529][ T563] RBP: 000055bf671ccf80 R08: 0000000000000003 R09: 0000000000000000 [ 30.932792][ T563] R10: 0000000000000020 R11: 0000000000000246 R12: 0000000000000004 [ 30.933036][ T563] R13: 00007fdfae841760 R14: 0000000000000004 R15: 00007fdfae83c9c0 [ 30.933295][ T563] [ 30.993943][ T568] netdevsim netdevsim400 eni400np1: renamed from eth0 [ 31.095717][ T566] netdevsim netdevsim755 eni755np1: renamed from eth1