Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154923178
D33387.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
D33387.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D33387: Move fork_rfppwait() check into ast()
Attached
Detach File
Event Timeline
Log In to Comment