aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2026-06-06 12:52:15 +0000
committerMark Johnston <markj@FreeBSD.org>2026-06-06 12:52:15 +0000
commit1ee4b5fd824aa93f9a20df6bd5dad50c7e32fe05 (patch)
tree48d6d4a794881fea0d4a1b9ad060d5345764c76a
parent85195c0c7f8a2926f0ba131178d9231bc33c81b5 (diff)
fork: Drop an uneeded PHOLD/PRELE pair
Support for swapping out kernel stacks was removed, so the PHOLD has no purpose. (And even before that, it's not clear why a swapout here would have been problematic.) Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57486
-rw-r--r--sys/kern/kern_fork.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 36647ae44f08..75f8413e5f36 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -675,11 +675,6 @@ do_fork(struct thread *td, struct fork_req *fr, struct proc *p2, struct thread *
callout_init_mtx(&p2->p_itcallout, &p2->p_mtx, 0);
- /*
- * This begins the section where we must prevent the parent
- * from being swapped.
- */
- _PHOLD(p1);
PROC_UNLOCK(p1);
/*
@@ -786,10 +781,6 @@ do_fork(struct thread *td, struct fork_req *fr, struct proc *p2, struct thread *
*/
knote_fork(p1->p_klist, p2->p_pid);
- /*
- * Now can be swapped.
- */
- _PRELE(p1);
PROC_UNLOCK(p1);
SDT_PROBE3(proc, , , create, p2, p1, fr->fr_flags);