git: 87e1a4346d90 - stable/13 - fasttrap: Assert that fasttrap_fork() successfully unmaps scratch space
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Mar 2022 16:26:41 UTC
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=87e1a4346d908b3d4cd1fc93f97968197ab80240 commit 87e1a4346d908b3d4cd1fc93f97968197ab80240 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-03-01 16:52:39 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-03-15 15:40:36 +0000 fasttrap: Assert that fasttrap_fork() successfully unmaps scratch space No functional change intended. Sponsored by: The FreeBSD Foundation (cherry picked from commit 83958173eb7d3f9d402e6dc81e66d179a808dd63) --- sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c index 4771a67a9f09..d96d3f44182e 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c @@ -588,7 +588,7 @@ fasttrap_fork(proc_t *p, proc_t *cp) fasttrap_proc_t *fprc = NULL; #endif pid_t ppid = p->p_pid; - int i; + int error, i; ASSERT(curproc == p); #ifdef illumos @@ -678,9 +678,10 @@ fasttrap_fork(proc_t *p, proc_t *cp) if (fprc != NULL) { mutex_enter(&fprc->ftpc_mtx); LIST_FOREACH(scrblk, &fprc->ftpc_scrblks, ftsb_next) { - vm_map_remove(&cp->p_vmspace->vm_map, + error = vm_map_remove(&cp->p_vmspace->vm_map, scrblk->ftsb_addr, scrblk->ftsb_addr + FASTTRAP_SCRBLOCK_SIZE); + ASSERT(error == KERN_SUCCESS); } mutex_exit(&fprc->ftpc_mtx); }