[ 13.752507][ T287] [ 13.752639][ T287] ============================================ [ 13.752844][ T287] WARNING: possible recursive locking detected [ 13.753044][ T287] 6.13.0-rc5-virtme #1 Not tainted [ 13.753207][ T287] -------------------------------------------- [ 13.753407][ T287] echo/287 is trying to acquire lock: [ 13.753567][ T287] ffffffff897f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 13.753910][ T287] [ 13.753910][ T287] but task is already holding lock: [ 13.754145][ T287] ffffffff897f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 13.754462][ T287] [ 13.754462][ T287] other info that might help us debug this: [ 13.754692][ T287] Possible unsafe locking scenario: [ 13.754692][ T287] [ 13.754922][ T287] CPU0 [ 13.755041][ T287] ---- [ 13.755160][ T287] lock((netdev_chain).rwsem); [ 13.755322][ T287] lock((netdev_chain).rwsem); [ 13.755480][ T287] [ 13.755480][ T287] *** DEADLOCK *** [ 13.755480][ T287] [ 13.755715][ T287] May be due to missing lock nesting notation [ 13.755715][ T287] [ 13.755946][ T287] 8 locks held by echo/287: [ 13.756105][ T287] #0: ffff88800a9fc3f0 (sb_writers#8){.+.+}-{0:0}, at: ksys_write+0xf8/0x1d0 [ 13.756393][ T287] #1: ffff88800ab3be88 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x20b/0x460 [ 13.756680][ T287] #2: ffff8880099bca30 (kn->active#33){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22e/0x460 [ 13.757000][ T287] #3: ffffffffc0231628 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: new_device_store+0x12a/0x690 [netdevsim] [ 13.757371][ T287] #4: ffff88800c9608e8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x76/0x3f0 [ 13.757658][ T287] #5: ffff88800c963a50 (&devlink->lock_key){+.+.}-{4:4}, at: nsim_drv_probe+0xb7/0x8b0 [netdevsim] [ 13.757987][ T287] #6: ffffffff89807e88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_create+0x46a/0xa60 [netdevsim] [ 13.758277][ T287] #7: ffffffff897f6a70 ((netdev_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x50/0x90 [ 13.758599][ T287] [ 13.758599][ T287] stack backtrace: [ 13.758794][ T287] CPU: 1 UID: 0 PID: 287 Comm: echo Not tainted 6.13.0-rc5-virtme #1 [ 13.759033][ T287] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 13.759229][ T287] Call Trace: [ 13.759349][ T287] [ 13.759431][ T287] dump_stack_lvl+0x82/0xd0 [ 13.759615][ T287] print_deadlock_bug+0x40a/0x650 [ 13.759782][ T287] validate_chain+0x5bf/0xae0 [ 13.759947][ T287] ? __pfx_validate_chain+0x10/0x10 [ 13.760112][ T287] ? hlock_class+0x4e/0x130 [ 13.760275][ T287] ? mark_lock+0x38/0x3e0 [ 13.760400][ T287] __lock_acquire+0xb9a/0x1680 [ 13.760561][ T287] ? udp_tunnel_nic_netdevice_event+0xd1/0x5c0 [ 13.760765][ T287] ? really_probe+0x1df/0x920 [ 13.760929][ T287] lock_acquire.part.0+0xeb/0x330 [ 13.761096][ T287] ? blocking_notifier_call_chain+0x50/0x90 [ 13.761299][ T287] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 13.761502][ T287] ? find_held_lock+0x2c/0x110 [ 13.761664][ T287] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 13.761826][ T287] ? trace_lock_acquire+0x14c/0x1f0 [ 13.761989][ T287] ? lock_acquire+0x32/0xc0 [ 13.762166][ T287] ? blocking_notifier_call_chain+0x50/0x90 [ 13.762371][ T287] down_read+0x9f/0x340 [ 13.762496][ T287] ? blocking_notifier_call_chain+0x50/0x90 [ 13.762697][ T287] ? __pfx_down_read+0x10/0x10 [ 13.762861][ T287] ? notifier_call_chain+0xcd/0x150 [ 13.763024][ T287] blocking_notifier_call_chain+0x50/0x90 [ 13.763186][ T287] call_netdevice_notifiers+0x71/0xa0 [ 13.763359][ T287] ? __pfx_call_netdevice_notifiers+0x10/0x10 [ 13.763581][ T287] ? mutex_is_locked+0x1c/0x60 [ 13.763744][ T287] udp_tunnel_nic_register+0x591/0x870 [ 13.763908][ T287] udp_tunnel_nic_netdevice_event+0x11d/0x5c0 [ 13.764110][ T287] notifier_call_chain+0xcd/0x150 [ 13.764277][ T287] blocking_notifier_call_chain+0x66/0x90 [ 13.764441][ T287] register_netdevice+0xe75/0x1360 [ 13.764609][ T287] ? __pfx_register_netdevice+0x10/0x10 [ 13.764784][ T287] nsim_create+0x6c2/0xa60 [netdevsim] [ 13.764957][ T287] __nsim_dev_port_add+0x22f/0x6e0 [netdevsim] [ 13.765164][ T287] ? mark_lock+0x38/0x3e0 [ 13.765284][ T287] ? __pfx___nsim_dev_port_add+0x10/0x10 [netdevsim] [ 13.765493][ T287] ? lockdep_hardirqs_on_prepare+0x275/0x410 [ 13.765692][ T287] nsim_dev_port_add_all+0x39/0xf0 [netdevsim] [ 13.765901][ T287] nsim_drv_probe+0x61e/0x8b0 [netdevsim] [ 13.766070][ T287] ? __pfx_nsim_drv_probe+0x10/0x10 [netdevsim] [ 13.766277][ T287] ? kernfs_create_link+0x173/0x240 [ 13.766436][ T287] ? kernfs_put+0x1c/0x40 [ 13.766557][ T287] ? sysfs_do_create_link_sd+0x8c/0x100 [ 13.766718][ T287] really_probe+0x1df/0x920 [ 13.766884][ T287] __driver_probe_device+0x2e6/0x3e0 [ 13.767043][ T287] driver_probe_device+0x49/0x140 [ 13.767201][ T287] __device_attach_driver+0x192/0x2b0 [ 13.767361][ T287] ? __pfx___device_attach_driver+0x10/0x10 [ 13.767560][ T287] bus_for_each_drv+0x107/0x1a0 [ 13.767718][ T287] ? __pfx_bus_for_each_drv+0x10/0x10 [ 13.767875][ T287] ? bus_to_subsys+0xd5/0x110 [ 13.768037][ T287] ? __pfx___lock_release+0x10/0x10 [ 13.768195][ T287] ? __pfx_lock_acquire.part.0+0x10/0x10 [ 13.768354][ T287] __device_attach+0x1a3/0x3f0 [ 13.768514][ T287] ? __pfx___device_attach+0x10/0x10 [ 13.768674][ T287] ? bus_to_subsys+0xd5/0x110 [ 13.768832][ T287] ? do_raw_spin_unlock+0x58/0x220 [ 13.769009][ T287] bus_probe_device+0x133/0x180 [ 13.769177][ T287] device_add+0x99d/0x1110 [ 13.769341][ T287] ? __pfx_device_add+0x10/0x10 [ 13.769502][ T287] ? __init_waitqueue_head+0xcf/0x150 [ 13.769668][ T287] new_device_store+0x393/0x690 [netdevsim] [ 13.769882][ T287] ? __pfx_new_device_store+0x10/0x10 [netdevsim] [ 13.770097][ T287] ? __pfx_sysfs_kf_write+0x10/0x10 [ 13.770269][ T287] ? sysfs_file_ops+0x11e/0x170 [ 13.770430][ T287] ? __pfx_sysfs_kf_write+0x10/0x10 [ 13.770587][ T287] kernfs_fop_write_iter+0x2ba/0x460 [ 13.770747][ T287] vfs_write+0xa81/0x11e0 [ 13.770870][ T287] ? __pfx_vfs_write+0x10/0x10 [ 13.771029][ T287] ? __lock_release+0x103/0x460 [ 13.771187][ T287] ? do_user_addr_fault+0x972/0xe30 [ 13.771349][ T287] ? __pfx___up_read+0x10/0x10 [ 13.771509][ T287] ksys_write+0xf8/0x1d0 [ 13.771632][ T287] ? __pfx_ksys_write+0x10/0x10 [ 13.771790][ T287] ? do_user_addr_fault+0x97c/0xe30 [ 13.771950][ T287] do_syscall_64+0xc1/0x1d0 [ 13.772138][ T287] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 13.772340][ T287] RIP: 0033:0x7f30b1a67b77 [ 13.772508][ T287] 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 [ 13.773086][ T287] RSP: 002b:00007fff0f081508 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 13.773334][ T287] RAX: ffffffffffffffda RBX: 0000000000000007 RCX: 00007f30b1a67b77 [ 13.773584][ T287] RDX: 0000000000000007 RSI: 0000561847d242f0 RDI: 0000000000000001 [ 13.773820][ T287] RBP: 0000561847d242f0 R08: 0000000000000006 R09: 0000000000000077 [ 13.774062][ T287] R10: 0000000000000063 R11: 0000000000000246 R12: 0000000000000007 [ 13.774298][ T287] R13: 00007f30b1b23760 R14: 0000000000000007 R15: 00007f30b1b1e9c0 [ 13.774538][ T287] [ 14.399228][ T298] GACT probability NOT on [ 14.542078][ T302] drop_monitor: Initializing network drop monitor service