Skip to content

Commit 1ee4b5f

Browse files
committed
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
1 parent 85195c0 commit 1ee4b5f

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

sys/kern/kern_fork.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -675,11 +675,6 @@ do_fork(struct thread *td, struct fork_req *fr, struct proc *p2, struct thread *
675675

676676
callout_init_mtx(&p2->p_itcallout, &p2->p_mtx, 0);
677677

678-
/*
679-
* This begins the section where we must prevent the parent
680-
* from being swapped.
681-
*/
682-
_PHOLD(p1);
683678
PROC_UNLOCK(p1);
684679

685680
/*
@@ -786,10 +781,6 @@ do_fork(struct thread *td, struct fork_req *fr, struct proc *p2, struct thread *
786781
*/
787782
knote_fork(p1->p_klist, p2->p_pid);
788783

789-
/*
790-
* Now can be swapped.
791-
*/
792-
_PRELE(p1);
793784
PROC_UNLOCK(p1);
794785
SDT_PROBE3(proc, , , create, p2, p1, fr->fr_flags);
795786

0 commit comments

Comments
 (0)