git: 55ad7c573e5b - stable/15 - vm_object: Reset kvo_path on each iteration in vm_object_list_handler()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Oct 2025 14:13:59 UTC
The branch stable/15 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=55ad7c573e5b7b8fa25dd368ccad1d1774c77824
commit 55ad7c573e5b7b8fa25dd368ccad1d1774c77824
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-10-10 13:26:29 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-10-17 12:42:44 +0000
vm_object: Reset kvo_path on each iteration in vm_object_list_handler()
Otherwise we print a bogus path for anonymous objects.
Reviewed by: kib
MFC after: 1 week
Sponsored by: Modirum MDPay
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D52997
(cherry picked from commit 13d866b314f87df901c0a1cbbbc56d56ee0d7b7c)
---
sys/vm/vm_object.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 6d9ea8bf9d93..fe84523b7a8f 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -2522,15 +2522,13 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only)
continue;
}
mtx_unlock(&vm_object_list_mtx);
+
+ memset(kvo, 0, sizeof(*kvo));
kvo->kvo_size = ptoa(obj->size);
kvo->kvo_resident = obj->resident_page_count;
kvo->kvo_ref_count = obj->ref_count;
kvo->kvo_shadow_count = atomic_load_int(&obj->shadow_count);
kvo->kvo_memattr = obj->memattr;
- kvo->kvo_active = 0;
- kvo->kvo_inactive = 0;
- kvo->kvo_laundry = 0;
- kvo->kvo_flags = 0;
if (!swap_only) {
vm_page_iter_init(&pages, obj);
VM_RADIX_FOREACH(m, &pages) {
@@ -2552,9 +2550,6 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only)
}
}
- kvo->kvo_vn_fileid = 0;
- kvo->kvo_vn_fsid = 0;
- kvo->kvo_vn_fsid_freebsd11 = 0;
freepath = NULL;
fullpath = "";
vp = NULL;