Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153374734
D26988.id78857.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
D26988.id78857.diff
View Options
Index: sys/kern/subr_syscall.c
===================================================================
--- sys/kern/subr_syscall.c
+++ sys/kern/subr_syscall.c
@@ -127,12 +127,6 @@
}
#endif
- error = syscall_thread_enter(td, se);
- if (error != 0) {
- td->td_errno = error;
- goto retval;
- }
-
/*
* Fetch fast sigblock value at the time of syscall entry to
* handle sleepqueue primitives which might call cursig().
@@ -145,7 +139,14 @@
("%s: TDP_NERRNO set", __func__));
if (__predict_false(SYSTRACE_ENABLED() ||
- AUDIT_SYSCALL_ENTER(sa->code, td))) {
+ AUDIT_SYSCALL_ENTER(sa->code, td) ||
+ (se->sy_thrcnt & SY_THR_STATIC) == 0)) {
+ error = syscall_thread_enter(td, se);
+ if (error != 0) {
+ td->td_errno = error;
+ goto retval;
+ }
+
#ifdef KDTRACE_HOOKS
/* Give the syscall:::entry DTrace probe a chance to fire. */
if (__predict_false(se->sy_entry != 0))
@@ -175,6 +176,8 @@
(*systrace_probe_func)(sa, SYSTRACE_RETURN,
error ? -1 : td->td_retval[0]);
#endif
+
+ syscall_thread_exit(td, se);
} else {
error = (se->sy_call)(td, sa->args);
/* Save the latest error return value. */
@@ -183,7 +186,6 @@
else
td->td_errno = error;
}
- syscall_thread_exit(td, se);
retval:
KTR_STOP4(KTR_SYSC, "syscall", syscallname(p, sa->code),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 21, 7:15 PM (3 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31928125
Default Alt Text
D26988.id78857.diff (1 KB)
Attached To
Mode
D26988: Move syscall_thread_{enter,exit}() to the slow path
Attached
Detach File
Event Timeline
Log In to Comment