[ 10.197423][ T251] [ 10.197614][ T251] ============================================ [ 10.197820][ T251] WARNING: possible recursive locking detected [ 10.198022][ T251] 6.13.0-rc5-virtme #1 Not tainted [ 10.198180][ T251] -------------------------------------------- [ 10.198376][ T251] busy_poll_test./251 is trying to acquire lock: [ 10.198575][ T251] ffffffffbb7f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 10.198904][ T251] [ 10.198904][ T251] but task is already holding lock: [ 10.199140][ T251] ffffffffbb7f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 10.199489][ T251] [ 10.199489][ T251] other info that might help us debug this: [ 10.199732][ T251] Possible unsafe locking scenario: [ 10.199732][ T251] [ 10.199988][ T251] CPU0 [ 10.200113][ T251] ---- [ 10.200235][ T251] lock((netdev_chain).rwsem); [ 10.200399][ T251] lock((netdev_chain).rwsem); [ 10.200571][ T251] [ 10.200571][ T251] *** DEADLOCK *** [ 10.200571][ T251] [ 10.200801][ T251] May be due to missing lock nesting notation [ 10.200801][ T251] [ 10.201034][ T251] 8 locks held by busy_poll_test./251: [ 10.201198][ T251] #0: ffff88800a4e93f0 (sb_writers#8){.+.+}-{0:0}, at: ksys_write+0xf8/0x1d0 [ 10.201483][ T251] #1: ffff88800deb9488 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x20b/0x460 [ 10.201768][ T251] #2: ffff888008dc79f0 (kn->active#33){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22e/0x460 [ 10.202088][ T251] #3: ffffffffc0512628 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x12a/0x690 [netdevsim] [ 10.202465][ T251] #4: ffff88800cdab8e8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x76/0x3f0 [ 10.202753][ T251] #5: ffff88800cdad250 (&devlink->lock_key){+.+.}-{4:4}, at: nsim_drv_probe+0xb7/0x8b0 [netdevsim] [ 10.203086][ T251] #6: ffffffffbb807e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x46a/0xa60 [netdevsim] [ 10.203383][ T251] #7: ffffffffbb7f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 10.203706][ T251] [ 10.203706][ T251] stack backtrace: [ 10.203903][ T251] CPU: 2 UID: 0 PID: 251 Comm: busy_poll_test. Not tainted 6.13.0-rc5-virtme #1 [ 10.204179][ T251] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 10.204378][ T251] Call Trace: [ 10.204503][ T251] [ 10.204585][ T251] dump_stack_lvl+0x82/0xd0 [ 10.204748][ T251] print_deadlock_bug+0x40a/0x650 [ 10.204908][ T251] validate_chain+0x5bf/0xae0 [ 10.205070][ T251] ? __pfx_validate_chain+0x10/0x10 [ 10.205231][ T251] ? hlock_class+0x4e/0x130 [ 10.205391][ T251] ? mark_lock+0x38/0x3e0 [ 10.205513][ T251] __lock_acquire+0xb9a/0x1680 [ 10.205677][ T251] ? udp_tunnel_nic_netdevice_event+0xd1/0x5c0 [ 10.205876][ T251] ? really_probe+0x1df/0x920 [ 10.206037][ T251] lock_acquire.part.0+0xeb/0x330 [ 10.206197][ T251] ? blocking_notifier_call_chain+0x50/0x90 [ 10.206399][ T251] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 10.206599][ T251] ? find_held_lock+0x2c/0x110 [ 10.206759][ T251] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 10.206922][ T251] ? trace_lock_acquire+0x14c/0x1f0 [ 10.207083][ T251] ? lock_acquire+0x32/0xc0 [ 10.207242][ T251] ? blocking_notifier_call_chain+0x50/0x90 [ 10.207440][ T251] down_read+0x9f/0x340 [ 10.207562][ T251] ? blocking_notifier_call_chain+0x50/0x90 [ 10.207760][ T251] ? __pfx_down_read+0x10/0x10 [ 10.207920][ T251] ? notifier_call_chain+0xcd/0x150 [ 10.208083][ T251] blocking_notifier_call_chain+0x50/0x90 [ 10.208244][ T251] call_netdevice_notifiers+0x71/0xa0 [ 10.208403][ T251] ? __pfx_call_netdevice_notifiers+0x10/0x10 [ 10.208600][ T251] ? mutex_is_locked+0x1c/0x60 [ 10.208760][ T251] udp_tunnel_nic_register+0x591/0x870 [ 10.208919][ T251] udp_tunnel_nic_netdevice_event+0x11d/0x5c0 [ 10.209118][ T251] notifier_call_chain+0xcd/0x150 [ 10.209316][ T251] blocking_notifier_call_chain+0x66/0x90 [ 10.209480][ T251] register_netdevice+0xe75/0x1360 [ 10.209646][ T251] ? __pfx_register_netdevice+0x10/0x10 [ 10.209811][ T251] nsim_create+0x6c2/0xa60 [netdevsim] [ 10.209986][ T251] __nsim_dev_port_add+0x22f/0x6e0 [netdevsim] [ 10.210197][ T251] ? mark_lock+0x38/0x3e0 [ 10.210321][ T251] ? __pfx___nsim_dev_port_add+0x10/0x10 [netdevsim] [ 10.210540][ T251] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 10.210751][ T251] nsim_dev_port_add_all+0x39/0xf0 [netdevsim] [ 10.210959][ T251] nsim_drv_probe+0x61e/0x8b0 [netdevsim] [ 10.211127][ T251] ? __pfx_nsim_drv_probe+0x10/0x10 [netdevsim] [ 10.211332][ T251] ? kernfs_create_link+0x173/0x240 [ 10.211490][ T251] ? kernfs_put+0x1c/0x40 [ 10.211618][ T251] ? sysfs_do_create_link_sd+0x8c/0x100 [ 10.211779][ T251] really_probe+0x1df/0x920 [ 10.211941][ T251] __driver_probe_device+0x2e6/0x3e0 [ 10.212101][ T251] driver_probe_device+0x49/0x140 [ 10.212260][ T251] __device_attach_driver+0x192/0x2b0 [ 10.212419][ T251] ? __pfx___device_attach_driver+0x10/0x10 [ 10.212618][ T251] bus_for_each_drv+0x107/0x1a0 [ 10.212784][ T251] ? __pfx_bus_for_each_drv+0x10/0x10 [ 10.212943][ T251] ? bus_to_subsys+0xd5/0x110 [ 10.213102][ T251] ? __pfx___lock_release+0x10/0x10 [ 10.213262][ T251] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 10.213422][ T251] __device_attach+0x1a3/0x3f0 [ 10.213583][ T251] ? __pfx___device_attach+0x10/0x10 [ 10.213741][ T251] ? bus_to_subsys+0xd5/0x110 [ 10.213902][ T251] ? do_raw_spin_unlock+0x58/0x220 [ 10.214062][ T251] bus_probe_device+0x133/0x180 [ 10.214224][ T251] device_add+0x99d/0x1110 [ 10.214383][ T251] ? __pfx_device_add+0x10/0x10 [ 10.214542][ T251] ? __init_waitqueue_head+0xcf/0x150 [ 10.214705][ T251] new_device_store+0x393/0x690 [netdevsim] [ 10.214913][ T251] ? __pfx_new_device_store+0x10/0x10 [netdevsim] [ 10.215129][ T251] ? __pfx_sysfs_kf_write+0x10/0x10 [ 10.215287][ T251] ? sysfs_file_ops+0x11e/0x170 [ 10.215448][ T251] ? __pfx_sysfs_kf_write+0x10/0x10 [ 10.215608][ T251] kernfs_fop_write_iter+0x2ba/0x460 [ 10.215768][ T251] vfs_write+0xa81/0x11e0 [ 10.215890][ T251] ? __pfx_vfs_write+0x10/0x10 [ 10.216050][ T251] ? __lock_release+0x103/0x460 [ 10.216213][ T251] ? do_user_addr_fault+0x972/0xe30 [ 10.216375][ T251] ? __pfx___up_read+0x10/0x10 [ 10.216536][ T251] ksys_write+0xf8/0x1d0 [ 10.216658][ T251] ? __pfx_ksys_write+0x10/0x10 [ 10.216816][ T251] ? do_user_addr_fault+0x97c/0xe30 [ 10.216976][ T251] do_syscall_64+0xc1/0x1d0 [ 10.217136][ T251] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 10.217337][ T251] RIP: 0033:0x7f39f576fb77 [ 10.217502][ T251] 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 [ 10.218059][ T251] RSP: 002b:00007ffc5791c608 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 10.218300][ T251] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f39f576fb77 [ 10.218542][ T251] RDX: 0000000000000004 RSI: 000055f05a8a0f80 RDI: 0000000000000001 [ 10.218780][ T251] RBP: 000055f05a8a0f80 R08: 0000000000000003 R09: 0000000000000000 [ 10.219017][ T251] R10: 0000000000000020 R11: 0000000000000246 R12: 0000000000000004 [ 10.219282][ T251] R13: 00007f39f582b760 R14: 0000000000000004 R15: 00007f39f58269c0 [ 10.219536][ T251] [ 10.306918][ T253] netdevsim netdevsim499 eni499np1: renamed from eth0 [ 10.405019][ T254] netdevsim netdevsim637 eni637np1: renamed from eth1