The branch main has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=be30fd3ab2e8418a696e69f54a91a7e2db5962de
commit be30fd3ab2e8418a696e69f54a91a7e2db5962de Author: Mike Karels <kar...@freebsd.org> AuthorDate: 2023-07-07 13:37:16 +0000 Commit: Mike Karels <kar...@freebsd.org> CommitDate: 2023-07-07 13:37:16 +0000 KERN_PROC_VM_LAYOUT sysctl: fix bug in 32-bit-compatible path vmspace_free() is called redundantly in the 32-bit-compatible path in sysctl_kern_proc_vm_layout(), causing a premature free (possibly for the current address space). Remove the extra call. PR: 272401 Reported by: marklmi at yahoo.com Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40908 --- sys/kern/kern_proc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 19b3b41aa6f3..6d804d93eccc 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -3286,7 +3286,6 @@ sysctl_kern_proc_vm_layout(SYSCTL_HANDLER_ARGS) kvm32.kvm_shp_addr = (uint32_t)kvm.kvm_shp_addr; kvm32.kvm_shp_size = (uint32_t)kvm.kvm_shp_size; kvm32.kvm_map_flags = kvm.kvm_map_flags; - vmspace_free(vmspace); error = SYSCTL_OUT(req, &kvm32, sizeof(kvm32)); goto out; }