[ 3.268540] ------------[ cut here ]------------ [ 3.268604] refcount_t: underflow; use-after-free. [ 3.268664] WARNING: CPU: 3 PID: 66 at lib/refcount.c:28 refcount_warn_saturate+0xbc/0x110 [ 3.268736] Modules linked in: netdevsim psample [ 3.268775] CPU: 3 UID: 0 PID: 66 Comm: kworker/u16:1 Not tainted 6.18.0-rc4-virtme #1 PREEMPT(voluntary) [ 3.268844] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 3.268904] Workqueue: netns cleanup_net [ 3.268954] RIP: 0010:refcount_warn_saturate+0xbc/0x110 [ 3.268999] Code: a6 e8 e8 54 ba ff 90 0f 0b 90 90 c3 80 3d 00 e6 2b 01 00 75 89 c6 05 f7 e5 2b 01 01 90 48 c7 c7 f8 48 f5 a6 e8 c5 54 ba ff 90 <0f> 0b 90 90 c3 80 3d db e5 2b 01 00 0f 85 62 ff ff ff c6 05 ce e5 [ 3.269150] RSP: 0000:ffffb1a50024fd50 EFLAGS: 00010286 [ 3.269189] RAX: 0000000000000000 RBX: ffffb1a50024fd60 RCX: 00000000ffffdfff [ 3.269248] RDX: 0000000000000000 RSI: 00000000ffffffea RDI: 0000000000000001 [ 3.269303] RBP: ffffb1a50024f858 R08: ffffffffa775ba28 R09: 00000000ffffdfff [ 3.269361] R10: ffffffffa767ba40 R11: ffffffffa772ba40 R12: dead000000000122 [ 3.269415] R13: 00000000fffb785f R14: 0000000000000001 R15: ffff92c946c2b000 [ 3.269474] FS: 0000000000000000(0000) GS:ffff92c9d6f11000(0000) knlGS:0000000000000000 [ 3.269538] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3.269594] CR2: 00007f255046eae4 CR3: 000000000452b001 CR4: 0000000000772ef0 [ 3.269652] PKRU: 55555554 [ 3.269669] Call Trace: [ 3.269690] [ 3.269715] netdev_run_todo+0x21a/0x550 [ 3.269745] ops_undo_list+0x1e3/0x1f0 [ 3.269784] cleanup_net+0x1b7/0x300 [ 3.269822] process_one_work+0x162/0x380 [ 3.269871] worker_thread+0x299/0x3c0 [ 3.269906] ? rescuer_thread+0x4c0/0x4c0 [ 3.269945] kthread+0x101/0x1f0 [ 3.269978] ? kthreads_online_cpu+0x110/0x110 [ 3.270021] ? kthreads_online_cpu+0x110/0x110 [ 3.270058] ret_from_fork+0x11c/0x140 [ 3.270091] ? kthreads_online_cpu+0x110/0x110 [ 3.270128] ret_from_fork_asm+0x11/0x20 [ 3.270164] [ 3.270191] ---[ end trace 0000000000000000 ]--- [ 3.272314] netdevsim netdevsim21254 eni21254np1: renamed from eth0 [ 4.898586] ------------[ cut here ]------------ [ 4.898771] kernel BUG at net/core/net-sysfs.c:2246! [ 4.898852] Oops: invalid opcode: 0000 [#1] SMP [ 4.898910] CPU: 2 UID: 0 PID: 249 Comm: python3 Tainted: G W 6.18.0-rc4-virtme #1 PREEMPT(voluntary) [ 4.899005] Tainted: [W]=WARN [ 4.899039] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 4.899097] RIP: 0010:netdev_release+0x2d/0x30 [ 4.899162] Code: fa 0f 1f 44 00 00 80 7f d8 04 75 1d 55 48 8d af a8 fa ff ff 48 8b bf e0 fb ff ff e8 ed d7 a4 ff 48 89 ef 5d e9 a4 de a4 ff 90 <0f> 0b 90 f3 0f 1e fa 0f 1f 44 00 00 55 48 89 f5 48 8d 97 c8 fb ff [ 4.899318] RSP: 0018:ffffb1a5005a7bf0 EFLAGS: 00010297 [ 4.899372] RAX: ffffffffa6951ca0 RBX: 00000000ffffffff RCX: 0000000000000003 [ 4.899448] RDX: 0000000000000007 RSI: ffffffffa6758ea4 RDI: ffff92c942d0a558 [ 4.899517] RBP: ffff92c942d0a558 R08: 0000000000000010 R09: 000000000000004c [ 4.899589] R10: 0000000000000400 R11: 0000000000000050 R12: ffff92c943326500 [ 4.899658] R13: ffffffffa6cb2ea0 R14: ffff92c944557250 R15: ffff92c942d0a000 [ 4.899729] FS: 00007f677db5e740(0000) GS:ffff92c9d6e91000(0000) knlGS:0000000000000000 [ 4.899803] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4.899859] CR2: 00007f677052c810 CR3: 00000000046f0002 CR4: 0000000000772ef0 [ 4.899934] PKRU: 55555554 [ 4.899955] Call Trace: [ 4.899980] [ 4.900006] device_release+0x35/0x90 [ 4.900046] kobject_put+0x64/0xc0 [ 4.900085] netdev_run_todo+0x21a/0x550 [ 4.900127] nsim_destroy+0x95/0x180 [netdevsim] [ 4.900186] __nsim_dev_port_del+0x47/0x70 [netdevsim] [ 4.900238] nsim_dev_reload_destroy+0x5b/0x120 [netdevsim] [ 4.900290] nsim_drv_remove+0x2f/0xb0 [netdevsim] [ 4.900343] device_release_driver_internal+0x193/0x200 [ 4.900395] bus_remove_device+0xc1/0x100 [ 4.900435] device_del+0x15f/0x480 [ 4.900470] device_unregister+0x12/0x30 [ 4.900512] del_device_store+0x117/0x1a0 [netdevsim] [ 4.900562] kernfs_fop_write_iter+0x12b/0x1c0 [ 4.900617] vfs_write+0x33a/0x470 [ 4.900663] ksys_write+0x65/0xe0 [ 4.900703] do_syscall_64+0xa4/0xfd0 [ 4.900747] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 4.900801] RIP: 0033:0x7f677dd3d257 [ 4.900841] Code: 0f 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 [ 4.901004] RSP: 002b:00007ffc1769e158 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 4.901074] RAX: ffffffffffffffda RBX: 00007f677db5e6e0 RCX: 00007f677dd3d257 [ 4.901140] RDX: 0000000000000005 RSI: 0000562a80694f80 RDI: 0000000000000005 [ 4.901210] RBP: 0000000000000005 R08: 0000000000000000 R09: 0000000000000002 [ 4.901277] R10: 0000000000000002 R11: 0000000000000246 R12: 00007f676f91a940 [ 4.901345] R13: 0000562a80694f80 R14: 0000000000000005 R15: 0000562a801c59c0 [ 4.901413] [ 4.901435] Modules linked in: netdevsim psample [ 4.901529] ---[ end trace 0000000000000000 ]--- [ 4.901609] RIP: 0010:netdev_release+0x2d/0x30 [ 4.901684] Code: fa 0f 1f 44 00 00 80 7f d8 04 75 1d 55 48 8d af a8 fa ff ff 48 8b bf e0 fb ff ff e8 ed d7 a4 ff 48 89 ef 5d e9 a4 de a4 ff 90 <0f> 0b 90 f3 0f 1e fa 0f 1f 44 00 00 55 48 89 f5 48 8d 97 c8 fb ff [ 4.901874] RSP: 0018:ffffb1a5005a7bf0 EFLAGS: 00010297 [ 4.901945] RAX: ffffffffa6951ca0 RBX: 00000000ffffffff RCX: 0000000000000003 [ 4.902038] RDX: 0000000000000007 RSI: ffffffffa6758ea4 RDI: ffff92c942d0a558 [ 4.902133] RBP: ffff92c942d0a558 R08: 0000000000000010 R09: 000000000000004c [ 4.902226] R10: 0000000000000400 R11: 0000000000000050 R12: ffff92c943326500 [ 4.902320] R13: ffffffffa6cb2ea0 R14: ffff92c944557250 R15: ffff92c942d0a000 [ 4.902418] FS: 00007f677db5e740(0000) GS:ffff92c9d6e91000(0000) knlGS:0000000000000000 [ 4.902524] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4.902611] CR2: 00007f677052c810 CR3: 00000000046f0002 CR4: 0000000000772ef0 [ 4.902710] PKRU: 55555554