[ 258.288214][ T5420] [ 258.288402][ T5420] ============================================ [ 258.288692][ T5420] WARNING: possible recursive locking detected [ 258.289016][ T5420] 6.13.0-rc5-virtme #1 Not tainted [ 258.289281][ T5420] -------------------------------------------- [ 258.289598][ T5420] echo/5420 is trying to acquire lock: [ 258.289857][ T5420] ffffffff913f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 258.290387][ T5420] [ 258.290387][ T5420] but task is already holding lock: [ 258.290765][ T5420] ffffffff913f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 258.291304][ T5420] [ 258.291304][ T5420] other info that might help us debug this: [ 258.291684][ T5420] Possible unsafe locking scenario: [ 258.291684][ T5420] [ 258.292068][ T5420] CPU0 [ 258.292265][ T5420] ---- [ 258.292459][ T5420] lock((netdev_chain).rwsem); [ 258.292720][ T5420] lock((netdev_chain).rwsem); [ 258.292988][ T5420] [ 258.292988][ T5420] *** DEADLOCK *** [ 258.292988][ T5420] [ 258.293369][ T5420] May be due to missing lock nesting notation [ 258.293369][ T5420] [ 258.293750][ T5420] 8 locks held by echo/5420: [ 258.294014][ T5420] #0: ffff88800a4243f0 (sb_writers#8){.+.+}-{0:0}, at: ksys_write+0xf8/0x1d0 [ 258.294488][ T5420] #1: ffff88801062d088 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x20b/0x460 [ 258.294958][ T5420] #2: ffff88800984efd0 (kn->active#33){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22e/0x460 [ 258.295490][ T5420] #3: ffffffffc03a6628 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x12a/0x690 [netdevsim] [ 258.296104][ T5420] #4: ffff88801055b8e8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x76/0x3f0 [ 258.296576][ T5420] #5: ffff888004ec0a50 (&devlink->lock_key){+.+.}-{4:4}, at: nsim_drv_probe+0xb7/0x8b0 [netdevsim] [ 258.297126][ T5420] #6: ffffffff91407e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x46a/0xa60 [netdevsim] [ 258.297606][ T5420] #7: ffffffff913f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 258.298133][ T5420] [ 258.298133][ T5420] stack backtrace: [ 258.298459][ T5420] CPU: 0 UID: 0 PID: 5420 Comm: echo Not tainted 6.13.0-rc5-virtme #1 [ 258.298849][ T5420] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 258.299175][ T5420] Call Trace: [ 258.299374][ T5420] [ 258.299511][ T5420] dump_stack_lvl+0x82/0xd0 [ 258.299779][ T5420] print_deadlock_bug+0x40a/0x650 [ 258.300046][ T5420] validate_chain+0x5bf/0xae0 [ 258.300318][ T5420] ? __pfx_validate_chain+0x10/0x10 [ 258.300582][ T5420] ? hlock_class+0x4e/0x130 [ 258.300855][ T5420] ? mark_lock+0x38/0x3e0 [ 258.301059][ T5420] __lock_acquire+0xb9a/0x1680 [ 258.301322][ T5420] ? udp_tunnel_nic_netdevice_event+0xd1/0x5c0 [ 258.301649][ T5420] ? really_probe+0x1df/0x920 [ 258.301912][ T5420] lock_acquire.part.0+0xeb/0x330 [ 258.302174][ T5420] ? blocking_notifier_call_chain+0x50/0x90 [ 258.302505][ T5420] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 258.302829][ T5420] ? find_held_lock+0x2c/0x110 [ 258.303091][ T5420] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 258.303353][ T5420] ? trace_lock_acquire+0x14c/0x1f0 [ 258.303616][ T5420] ? lock_acquire+0x32/0xc0 [ 258.303879][ T5420] ? blocking_notifier_call_chain+0x50/0x90 [ 258.304211][ T5420] down_read+0x9f/0x340 [ 258.304411][ T5420] ? blocking_notifier_call_chain+0x50/0x90 [ 258.304735][ T5420] ? __pfx_down_read+0x10/0x10 [ 258.305001][ T5420] ? notifier_call_chain+0xcd/0x150 [ 258.305267][ T5420] blocking_notifier_call_chain+0x50/0x90 [ 258.305531][ T5420] call_netdevice_notifiers+0x71/0xa0 [ 258.305794][ T5420] ? __pfx_call_netdevice_notifiers+0x10/0x10 [ 258.306126][ T5420] ? mutex_is_locked+0x1c/0x60 [ 258.306389][ T5420] udp_tunnel_nic_register+0x591/0x870 [ 258.306653][ T5420] udp_tunnel_nic_netdevice_event+0x11d/0x5c0 [ 258.306981][ T5420] notifier_call_chain+0xcd/0x150 [ 258.307247][ T5420] blocking_notifier_call_chain+0x66/0x90 [ 258.307510][ T5420] register_netdevice+0xe75/0x1360 [ 258.307774][ T5420] ? __pfx_register_netdevice+0x10/0x10 [ 258.308046][ T5420] nsim_create+0x6c2/0xa60 [netdevsim] [ 258.308332][ T5420] __nsim_dev_port_add+0x22f/0x6e0 [netdevsim] [ 258.308676][ T5420] ? mark_lock+0x38/0x3e0 [ 258.308878][ T5420] ? __pfx___nsim_dev_port_add+0x10/0x10 [netdevsim] [ 258.309225][ T5420] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 258.309552][ T5420] nsim_dev_port_add_all+0x39/0xf0 [netdevsim] [ 258.309902][ T5420] nsim_drv_probe+0x61e/0x8b0 [netdevsim] [ 258.310184][ T5420] ? __pfx_nsim_drv_probe+0x10/0x10 [netdevsim] [ 258.310526][ T5420] ? kernfs_create_link+0x173/0x240 [ 258.310797][ T5420] ? kernfs_put+0x1c/0x40 [ 258.311005][ T5420] ? sysfs_do_create_link_sd+0x8c/0x100 [ 258.311272][ T5420] really_probe+0x1df/0x920 [ 258.311537][ T5420] __driver_probe_device+0x2e6/0x3e0 [ 258.311807][ T5420] driver_probe_device+0x49/0x140 [ 258.312071][ T5420] __device_attach_driver+0x192/0x2b0 [ 258.312334][ T5420] ? __pfx___device_attach_driver+0x10/0x10 [ 258.312662][ T5420] bus_for_each_drv+0x107/0x1a0 [ 258.312928][ T5420] ? __pfx_bus_for_each_drv+0x10/0x10 [ 258.313192][ T5420] ? bus_to_subsys+0xd5/0x110 [ 258.313454][ T5420] ? __pfx___lock_release+0x10/0x10 [ 258.313721][ T5420] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 258.313985][ T5420] __device_attach+0x1a3/0x3f0 [ 258.314249][ T5420] ? __pfx___device_attach+0x10/0x10 [ 258.314510][ T5420] ? bus_to_subsys+0xd5/0x110 [ 258.314769][ T5420] ? do_raw_spin_unlock+0x58/0x220 [ 258.315036][ T5420] bus_probe_device+0x133/0x180 [ 258.315300][ T5420] device_add+0x99d/0x1110 [ 258.315567][ T5420] ? __pfx_device_add+0x10/0x10 [ 258.315829][ T5420] ? __init_waitqueue_head+0xcf/0x150 [ 258.316098][ T5420] new_device_store+0x393/0x690 [netdevsim] [ 258.316445][ T5420] ? __pfx_new_device_store+0x10/0x10 [netdevsim] [ 258.316789][ T5420] ? __pfx_sysfs_kf_write+0x10/0x10 [ 258.317051][ T5420] ? sysfs_file_ops+0x11e/0x170 [ 258.317315][ T5420] ? __pfx_sysfs_kf_write+0x10/0x10 [ 258.317581][ T5420] kernfs_fop_write_iter+0x2ba/0x460 [ 258.317847][ T5420] vfs_write+0xa81/0x11e0 [ 258.318049][ T5420] ? __pfx_vfs_write+0x10/0x10 [ 258.318318][ T5420] ? fdget_pos+0x1a3/0x300 [ 258.318579][ T5420] ksys_write+0xf8/0x1d0 [ 258.318778][ T5420] ? __pfx_ksys_write+0x10/0x10 [ 258.319039][ T5420] ? do_user_addr_fault+0x97c/0xe30 [ 258.319310][ T5420] do_syscall_64+0xc1/0x1d0 [ 258.319574][ T5420] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 258.319901][ T5420] RIP: 0033:0x7f67d12c5b77 [ 258.320171][ T5420] 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 [ 258.321103][ T5420] RSP: 002b:00007ffc0ef594c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 258.321504][ T5420] RAX: ffffffffffffffda RBX: 0000000000000007 RCX: 00007f67d12c5b77 [ 258.321898][ T5420] RDX: 0000000000000007 RSI: 000055b1b3a672f0 RDI: 0000000000000001 [ 258.322292][ T5420] RBP: 000055b1b3a672f0 R08: 0000000000000006 R09: 0000000000000077 [ 258.322684][ T5420] R10: 0000000000000063 R11: 0000000000000246 R12: 0000000000000007 [ 258.323081][ T5420] R13: 00007f67d1381760 R14: 0000000000000007 R15: 00007f67d137c9c0 [ 258.323481][ T5420] [ 258.953325][ T5430] drop_monitor: Initializing network drop monitor service