diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2025-10-10 13:26:29 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2025-10-10 13:26:29 +0000 |
| commit | 13d866b314f87df901c0a1cbbbc56d56ee0d7b7c (patch) | |
| tree | bd283c1f1e3a8540c5b72d67f9b79493c226941d | |
| parent | 642c763a9ad14cbe70596cabc16f73b9ca99de57 (diff) | |
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
| -rw-r--r-- | sys/vm/vm_object.c | 9 |
1 files 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; |
