[ 211.197108][ T2591] [ 211.197300][ T2591] ============================================ [ 211.197520][ T2591] WARNING: possible recursive locking detected [ 211.197731][ T2591] 6.13.0-rc5-virtme #1 Not tainted [ 211.197900][ T2591] -------------------------------------------- [ 211.198105][ T2591] echo/2591 is trying to acquire lock: [ 211.198269][ T2591] ffffffffaa5f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 211.198606][ T2591] [ 211.198606][ T2591] but task is already holding lock: [ 211.198850][ T2591] ffffffffaa5f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 211.199182][ T2591] [ 211.199182][ T2591] other info that might help us debug this: [ 211.199423][ T2591] Possible unsafe locking scenario: [ 211.199423][ T2591] [ 211.199667][ T2591] CPU0 [ 211.199791][ T2591] ---- [ 211.199913][ T2591] lock((netdev_chain).rwsem); [ 211.200079][ T2591] lock((netdev_chain).rwsem); [ 211.200247][ T2591] [ 211.200247][ T2591] *** DEADLOCK *** [ 211.200247][ T2591] [ 211.200490][ T2591] May be due to missing lock nesting notation [ 211.200490][ T2591] [ 211.200732][ T2591] 8 locks held by echo/2591: [ 211.200897][ T2591] #0: ffff88800b1143f0 (sb_writers#8){.+.+}-{0:0}, at: ksys_write+0xf8/0x1d0 [ 211.201196][ T2591] #1: ffff88800ccbb888 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x20b/0x460 [ 211.201495][ T2591] #2: ffff888009d69450 (kn->active#34){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22e/0x460 [ 211.201828][ T2591] #3: ffffffffc03a0628 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x12a/0x690 [netdevsim] [ 211.202215][ T2591] #4: ffff8880026cb8e8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x76/0x3f0 [ 211.202507][ T2591] #5: ffff8880026cea50 (&devlink->lock_key){+.+.}-{4:4}, at: nsim_drv_probe+0xb7/0x8b0 [netdevsim] [ 211.202854][ T2591] #6: ffffffffaa607e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x46a/0xa60 [netdevsim] [ 211.203155][ T2591] #7: ffffffffaa5f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 211.203499][ T2591] [ 211.203499][ T2591] stack backtrace: [ 211.203704][ T2591] CPU: 3 UID: 0 PID: 2591 Comm: echo Not tainted 6.13.0-rc5-virtme #1 [ 211.203952][ T2591] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 211.204159][ T2591] Call Trace: [ 211.204285][ T2591] [ 211.204371][ T2591] dump_stack_lvl+0x82/0xd0 [ 211.204540][ T2591] print_deadlock_bug+0x40a/0x650 [ 211.204709][ T2591] validate_chain+0x5bf/0xae0 [ 211.204879][ T2591] ? __pfx_validate_chain+0x10/0x10 [ 211.205046][ T2591] ? hlock_class+0x4e/0x130 [ 211.205209][ T2591] ? mark_lock+0x38/0x3e0 [ 211.205336][ T2591] __lock_acquire+0xb9a/0x1680 [ 211.205502][ T2591] ? udp_tunnel_nic_netdevice_event+0xd1/0x5c0 [ 211.205718][ T2591] ? really_probe+0x1df/0x920 [ 211.205881][ T2591] lock_acquire.part.0+0xeb/0x330 [ 211.206047][ T2591] ? blocking_notifier_call_chain+0x50/0x90 [ 211.206254][ T2591] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 211.206457][ T2591] ? find_held_lock+0x2c/0x110 [ 211.206621][ T2591] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 211.206786][ T2591] ? trace_lock_acquire+0x14c/0x1f0 [ 211.206949][ T2591] ? lock_acquire+0x32/0xc0 [ 211.207111][ T2591] ? blocking_notifier_call_chain+0x50/0x90 [ 211.207316][ T2591] down_read+0x9f/0x340 [ 211.207452][ T2591] ? blocking_notifier_call_chain+0x50/0x90 [ 211.207656][ T2591] ? __pfx_down_read+0x10/0x10 [ 211.207820][ T2591] ? notifier_call_chain+0xcd/0x150 [ 211.207985][ T2591] blocking_notifier_call_chain+0x50/0x90 [ 211.208150][ T2591] call_netdevice_notifiers+0x71/0xa0 [ 211.208315][ T2591] ? __pfx_call_netdevice_notifiers+0x10/0x10 [ 211.208524][ T2591] ? mutex_is_locked+0x1c/0x60 [ 211.208691][ T2591] udp_tunnel_nic_register+0x591/0x870 [ 211.208858][ T2591] udp_tunnel_nic_netdevice_event+0x11d/0x5c0 [ 211.209061][ T2591] notifier_call_chain+0xcd/0x150 [ 211.209226][ T2591] blocking_notifier_call_chain+0x66/0x90 [ 211.209392][ T2591] register_netdevice+0xe75/0x1360 [ 211.209556][ T2591] ? __pfx_register_netdevice+0x10/0x10 [ 211.209726][ T2591] nsim_create+0x6c2/0xa60 [netdevsim] [ 211.209902][ T2591] __nsim_dev_port_add+0x22f/0x6e0 [netdevsim] [ 211.210117][ T2591] ? mark_lock+0x38/0x3e0 [ 211.210242][ T2591] ? __pfx___nsim_dev_port_add+0x10/0x10 [netdevsim] [ 211.210457][ T2591] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 211.210662][ T2591] nsim_dev_port_add_all+0x39/0xf0 [netdevsim] [ 211.210880][ T2591] nsim_drv_probe+0x61e/0x8b0 [netdevsim] [ 211.211054][ T2591] ? __pfx_nsim_drv_probe+0x10/0x10 [netdevsim] [ 211.211266][ T2591] ? kernfs_create_link+0x173/0x240 [ 211.211433][ T2591] ? kernfs_put+0x1c/0x40 [ 211.211561][ T2591] ? sysfs_do_create_link_sd+0x8c/0x100 [ 211.211729][ T2591] really_probe+0x1df/0x920 [ 211.211896][ T2591] __driver_probe_device+0x2e6/0x3e0 [ 211.212067][ T2591] driver_probe_device+0x49/0x140 [ 211.212231][ T2591] __device_attach_driver+0x192/0x2b0 [ 211.212398][ T2591] ? __pfx___device_attach_driver+0x10/0x10 [ 211.212602][ T2591] bus_for_each_drv+0x107/0x1a0 [ 211.212770][ T2591] ? __pfx_bus_for_each_drv+0x10/0x10 [ 211.212935][ T2591] ? bus_to_subsys+0xd5/0x110 [ 211.213101][ T2591] ? __pfx___lock_release+0x10/0x10 [ 211.213268][ T2591] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 211.213438][ T2591] __device_attach+0x1a3/0x3f0 [ 211.213603][ T2591] ? __pfx___device_attach+0x10/0x10 [ 211.213768][ T2591] ? bus_to_subsys+0xd5/0x110 [ 211.213932][ T2591] ? do_raw_spin_unlock+0x58/0x220 [ 211.214099][ T2591] bus_probe_device+0x133/0x180 [ 211.214264][ T2591] device_add+0x99d/0x1110 [ 211.214433][ T2591] ? __pfx_device_add+0x10/0x10 [ 211.214599][ T2591] ? __init_waitqueue_head+0xcf/0x150 [ 211.214767][ T2591] new_device_store+0x393/0x690 [netdevsim] [ 211.214982][ T2591] ? __pfx_new_device_store+0x10/0x10 [netdevsim] [ 211.215199][ T2591] ? __pfx_sysfs_kf_write+0x10/0x10 [ 211.215393][ T2591] ? sysfs_file_ops+0x11e/0x170 [ 211.215570][ T2591] ? __pfx_sysfs_kf_write+0x10/0x10 [ 211.215740][ T2591] kernfs_fop_write_iter+0x2ba/0x460 [ 211.215908][ T2591] vfs_write+0xa81/0x11e0 [ 211.216036][ T2591] ? __pfx_vfs_write+0x10/0x10 [ 211.216202][ T2591] ? __lock_release+0x103/0x460 [ 211.216367][ T2591] ? do_user_addr_fault+0x972/0xe30 [ 211.216534][ T2591] ? __pfx___up_read+0x10/0x10 [ 211.216701][ T2591] ksys_write+0xf8/0x1d0 [ 211.216825][ T2591] ? __pfx_ksys_write+0x10/0x10 [ 211.216990][ T2591] ? do_user_addr_fault+0x97c/0xe30 [ 211.217160][ T2591] do_syscall_64+0xc1/0x1d0 [ 211.217328][ T2591] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 211.217532][ T2591] RIP: 0033:0x7fc2ce24fb77 [ 211.217716][ T2591] 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 [ 211.218300][ T2591] RSP: 002b:00007fffa52763e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 211.218548][ T2591] RAX: ffffffffffffffda RBX: 0000000000000007 RCX: 00007fc2ce24fb77 [ 211.218795][ T2591] RDX: 0000000000000007 RSI: 0000558e2be1e2f0 RDI: 0000000000000001 [ 211.219040][ T2591] RBP: 0000558e2be1e2f0 R08: 0000000000000006 R09: 0000000000000077 [ 211.219399][ T2591] R10: 0000000000000063 R11: 0000000000000246 R12: 0000000000000007 [ 211.219646][ T2591] R13: 00007fc2ce30b760 R14: 0000000000000007 R15: 00007fc2ce3069c0 [ 211.219895][ T2591] [ 211.851403][ T2600] GACT probability NOT on [ 211.996319][ T2604] drop_monitor: Initializing network drop monitor service