[ 322.764401][ T1695] [ 322.764618][ T1695] ============================================ [ 322.764829][ T1695] WARNING: possible recursive locking detected [ 322.765031][ T1695] 6.13.0-rc5-virtme #1 Not tainted [ 322.765202][ T1695] -------------------------------------------- [ 322.765403][ T1695] echo/1695 is trying to acquire lock: [ 322.765566][ T1695] ffffffffa9bf6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 322.765903][ T1695] [ 322.765903][ T1695] but task is already holding lock: [ 322.766139][ T1695] ffffffffa9bf6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 322.766468][ T1695] [ 322.766468][ T1695] other info that might help us debug this: [ 322.766705][ T1695] Possible unsafe locking scenario: [ 322.766705][ T1695] [ 322.766945][ T1695] CPU0 [ 322.767069][ T1695] ---- [ 322.767193][ T1695] lock((netdev_chain).rwsem); [ 322.767359][ T1695] lock((netdev_chain).rwsem); [ 322.767525][ T1695] [ 322.767525][ T1695] *** DEADLOCK *** [ 322.767525][ T1695] [ 322.767768][ T1695] May be due to missing lock nesting notation [ 322.767768][ T1695] [ 322.768005][ T1695] 8 locks held by echo/1695: [ 322.768168][ T1695] #0: ffff88800abec3f0 (sb_writers#8){.+.+}-{0:0}, at: ksys_write+0xf8/0x1d0 [ 322.768467][ T1695] #1: ffff888009b58888 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x20b/0x460 [ 322.768762][ T1695] #2: ffff888009cf3b10 (kn->active#34){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22e/0x460 [ 322.769092][ T1695] #3: ffffffffc030f628 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x12a/0x690 [netdevsim] [ 322.769477][ T1695] #4: ffff88800fc388e8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x76/0x3f0 [ 322.769771][ T1695] #5: ffff88800be50a50 (&devlink->lock_key){+.+.}-{4:4}, at: nsim_drv_probe+0xb7/0x8b0 [netdevsim] [ 322.770117][ T1695] #6: ffffffffa9c07e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x46a/0xa60 [netdevsim] [ 322.770414][ T1695] #7: ffffffffa9bf6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 322.770746][ T1695] [ 322.770746][ T1695] stack backtrace: [ 322.770948][ T1695] CPU: 2 UID: 0 PID: 1695 Comm: echo Not tainted 6.13.0-rc5-virtme #1 [ 322.771215][ T1695] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 322.771420][ T1695] Call Trace: [ 322.771545][ T1695] [ 322.771630][ T1695] dump_stack_lvl+0x82/0xd0 [ 322.771800][ T1695] print_deadlock_bug+0x40a/0x650 [ 322.771967][ T1695] validate_chain+0x5bf/0xae0 [ 322.772131][ T1695] ? __pfx_validate_chain+0x10/0x10 [ 322.772302][ T1695] ? hlock_class+0x4e/0x130 [ 322.772467][ T1695] ? mark_lock+0x38/0x3e0 [ 322.772594][ T1695] __lock_acquire+0xb9a/0x1680 [ 322.772756][ T1695] ? udp_tunnel_nic_netdevice_event+0xd1/0x5c0 [ 322.772960][ T1695] ? really_probe+0x1df/0x920 [ 322.773126][ T1695] lock_acquire.part.0+0xeb/0x330 [ 322.773290][ T1695] ? blocking_notifier_call_chain+0x50/0x90 [ 322.773501][ T1695] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 322.773707][ T1695] ? find_held_lock+0x2c/0x110 [ 322.773871][ T1695] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 322.774038][ T1695] ? trace_lock_acquire+0x14c/0x1f0 [ 322.774204][ T1695] ? lock_acquire+0x32/0xc0 [ 322.774369][ T1695] ? blocking_notifier_call_chain+0x50/0x90 [ 322.774576][ T1695] down_read+0x9f/0x340 [ 322.774712][ T1695] ? blocking_notifier_call_chain+0x50/0x90 [ 322.774917][ T1695] ? __pfx_down_read+0x10/0x10 [ 322.775082][ T1695] ? notifier_call_chain+0xcd/0x150 [ 322.775248][ T1695] blocking_notifier_call_chain+0x50/0x90 [ 322.775413][ T1695] call_netdevice_notifiers+0x71/0xa0 [ 322.775580][ T1695] ? __pfx_call_netdevice_notifiers+0x10/0x10 [ 322.775792][ T1695] ? mutex_is_locked+0x1c/0x60 [ 322.775964][ T1695] udp_tunnel_nic_register+0x591/0x870 [ 322.776129][ T1695] udp_tunnel_nic_netdevice_event+0x11d/0x5c0 [ 322.776334][ T1695] notifier_call_chain+0xcd/0x150 [ 322.776501][ T1695] blocking_notifier_call_chain+0x66/0x90 [ 322.776665][ T1695] register_netdevice+0xe75/0x1360 [ 322.776832][ T1695] ? __pfx_register_netdevice+0x10/0x10 [ 322.776999][ T1695] nsim_create+0x6c2/0xa60 [netdevsim] [ 322.777183][ T1695] __nsim_dev_port_add+0x22f/0x6e0 [netdevsim] [ 322.777394][ T1695] ? mark_lock+0x38/0x3e0 [ 322.777519][ T1695] ? __pfx___nsim_dev_port_add+0x10/0x10 [netdevsim] [ 322.777732][ T1695] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 322.777941][ T1695] nsim_dev_port_add_all+0x39/0xf0 [netdevsim] [ 322.778155][ T1695] nsim_drv_probe+0x61e/0x8b0 [netdevsim] [ 322.778336][ T1695] ? __pfx_nsim_drv_probe+0x10/0x10 [netdevsim] [ 322.778550][ T1695] ? kernfs_create_link+0x173/0x240 [ 322.778719][ T1695] ? kernfs_put+0x1c/0x40 [ 322.778845][ T1695] ? sysfs_do_create_link_sd+0x8c/0x100 [ 322.779012][ T1695] really_probe+0x1df/0x920 [ 322.779178][ T1695] __driver_probe_device+0x2e6/0x3e0 [ 322.779343][ T1695] driver_probe_device+0x49/0x140 [ 322.779513][ T1695] __device_attach_driver+0x192/0x2b0 [ 322.779681][ T1695] ? __pfx___device_attach_driver+0x10/0x10 [ 322.779885][ T1695] bus_for_each_drv+0x107/0x1a0 [ 322.780052][ T1695] ? __pfx_bus_for_each_drv+0x10/0x10 [ 322.780220][ T1695] ? bus_to_subsys+0xd5/0x110 [ 322.780391][ T1695] ? __pfx___lock_release+0x10/0x10 [ 322.780558][ T1695] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 322.780727][ T1695] __device_attach+0x1a3/0x3f0 [ 322.780891][ T1695] ? __pfx___device_attach+0x10/0x10 [ 322.781060][ T1695] ? bus_to_subsys+0xd5/0x110 [ 322.781228][ T1695] ? do_raw_spin_unlock+0x58/0x220 [ 322.781397][ T1695] bus_probe_device+0x133/0x180 [ 322.781567][ T1695] device_add+0x99d/0x1110 [ 322.781749][ T1695] ? __pfx_device_add+0x10/0x10 [ 322.781935][ T1695] ? __init_waitqueue_head+0xcf/0x150 [ 322.782115][ T1695] new_device_store+0x393/0x690 [netdevsim] [ 322.782347][ T1695] ? __pfx_new_device_store+0x10/0x10 [netdevsim] [ 322.782581][ T1695] ? __pfx_sysfs_kf_write+0x10/0x10 [ 322.782759][ T1695] ? sysfs_file_ops+0x11e/0x170 [ 322.782938][ T1695] ? __pfx_sysfs_kf_write+0x10/0x10 [ 322.783116][ T1695] kernfs_fop_write_iter+0x2ba/0x460 [ 322.783303][ T1695] vfs_write+0xa81/0x11e0 [ 322.783442][ T1695] ? __pfx_vfs_write+0x10/0x10 [ 322.783622][ T1695] ? __lock_release+0x103/0x460 [ 322.783798][ T1695] ? do_user_addr_fault+0x972/0xe30 [ 322.783982][ T1695] ? __pfx___up_read+0x10/0x10 [ 322.784167][ T1695] ksys_write+0xf8/0x1d0 [ 322.784302][ T1695] ? __pfx_ksys_write+0x10/0x10 [ 322.784484][ T1695] ? do_user_addr_fault+0x97c/0xe30 [ 322.784664][ T1695] do_syscall_64+0xc1/0x1d0 [ 322.784849][ T1695] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 322.785071][ T1695] RIP: 0033:0x7f8d0a308b77 [ 322.785255][ T1695] 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 [ 322.785887][ T1695] RSP: 002b:00007ffd0fae4438 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 322.786155][ T1695] RAX: ffffffffffffffda RBX: 0000000000000007 RCX: 00007f8d0a308b77 [ 322.786422][ T1695] RDX: 0000000000000007 RSI: 0000564cb06482f0 RDI: 0000000000000001 [ 322.786675][ T1695] RBP: 0000564cb06482f0 R08: 0000000000000006 R09: 0000000000000077 [ 322.786931][ T1695] R10: 0000000000000063 R11: 0000000000000246 R12: 0000000000000007 [ 322.787177][ T1695] R13: 00007f8d0a3c4760 R14: 0000000000000007 R15: 00007f8d0a3bf9c0 [ 322.787427][ T1695] [ 323.406753][ T1703] GACT probability NOT on [ 323.565131][ T1707] drop_monitor: Initializing network drop monitor service