Page MenuHomeFreeBSD

D33387.diff
No OneTemporary

D33387.diff

diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -484,6 +484,12 @@
*/
thread_lock(td);
sched_fork(td, td2);
+ /*
+ * Request AST to check for TDP_RFPPWAIT. Do it here
+ * to avoid calling thread_lock() again.
+ */
+ if ((fr->fr_flags & RFPPWAIT) != 0)
+ td->td_flags |= TDF_ASTPENDING;
thread_unlock(td);
/*
diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c
--- a/sys/kern/subr_syscall.c
+++ b/sys/kern/subr_syscall.c
@@ -285,7 +285,4 @@
td->td_dbgflags &= ~(TDB_SCX | TDB_EXEC | TDB_FORK);
PROC_UNLOCK(p);
}
-
- if (__predict_false(td->td_pflags & TDP_RFPPWAIT))
- fork_rfppwait(td);
}
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -259,6 +259,8 @@
if (PMC_IS_PENDING_CALLCHAIN(td))
PMC_CALL_HOOK_UNLOCKED(td, PMC_FN_USER_CALLCHAIN_SOFT, (void *) framep);
#endif
+ if ((td->td_pflags & TDP_RFPPWAIT) != 0)
+ fork_rfppwait(td);
if (flags & TDF_ALRMPEND) {
PROC_LOCK(p);
kern_psignal(p, SIGVTALRM);

File Metadata

Mime Type
text/plain
Expires
Fri, May 1, 2:07 AM (4 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32549294
Default Alt Text
D33387.diff (1 KB)

Event Timeline