Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136992387
D18295.id50909.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D18295.id50909.diff
View Options
Index: sys/kern/kern_exit.c
===================================================================
--- sys/kern/kern_exit.c
+++ sys/kern/kern_exit.c
@@ -284,6 +284,11 @@
p->p_flag |= P_WEXIT;
wakeup(&p->p_stype);
+ if (p->p_flag & P_PPWAIT) {
+ p->p_flag &= ~P_PPWAIT;
+ cv_broadcast(&p->p_pwait);
+ }
+
/*
* Wait for any processes that have a hold on our vmspace to
* release their reference.
Index: sys/kern/kern_fork.c
===================================================================
--- sys/kern/kern_fork.c
+++ sys/kern/kern_fork.c
@@ -723,6 +723,7 @@
*/
_PHOLD(p2);
if (fr->fr_flags & RFPPWAIT) {
+ _PHOLD(p2);
td->td_pflags |= TDP_RFPPWAIT;
td->td_rfppwait_p = p2;
td->td_dbgflags |= TDB_VFORK;
Index: sys/kern/subr_syscall.c
===================================================================
--- sys/kern/subr_syscall.c
+++ sys/kern/subr_syscall.c
@@ -257,6 +257,7 @@
}
cv_timedwait(&p2->p_pwait, &p2->p_mtx, hz);
}
+ _PRELE(p2);
PROC_UNLOCK(p2);
if (td->td_dbgflags & TDB_VFORK) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 21, 10:43 PM (21 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25818630
Default Alt Text
D18295.id50909.diff (1 KB)
Attached To
Mode
D18295: fork: fix use-after-free with vfork
Attached
Detach File
Event Timeline
Log In to Comment