Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163539467
D27303.id79829.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
D27303.id79829.diff
View Options
Index: head/sys/kern/kern_exec.c
===================================================================
--- head/sys/kern/kern_exec.c
+++ head/sys/kern/kern_exec.c
@@ -67,6 +67,7 @@
#include <sys/sysctl.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
+#include <sys/umtx.h>
#include <sys/vnode.h>
#include <sys/wait.h>
#ifdef KTRACE
@@ -1047,8 +1048,8 @@
imgp->sysent = sv;
sigfastblock_clear(td);
+ umtx_exec(p);
- /* May be called with Giant held */
EVENTHANDLER_DIRECT_INVOKE(process_exec, p, imgp);
/*
Index: head/sys/kern/kern_umtx.c
===================================================================
--- head/sys/kern/kern_umtx.c
+++ head/sys/kern/kern_umtx.c
@@ -446,8 +446,6 @@
umtx_init_profiling();
#endif
mtx_init(&umtx_lock, "umtx lock", NULL, MTX_DEF);
- EVENTHANDLER_REGISTER(process_exec, umtx_exec_hook, NULL,
- EVENTHANDLER_PRI_ANY);
umtx_shm_init();
}
@@ -4356,12 +4354,11 @@
* exec() hook.
*
* Clear robust lists for all process' threads, not delaying the
- * cleanup to thread_exit hook, since the relevant address space is
+ * cleanup to thread exit, since the relevant address space is
* destroyed right now.
*/
-static void
-umtx_exec_hook(void *arg __unused, struct proc *p,
- struct image_params *imgp __unused)
+void
+umtx_exec(struct proc *p)
{
struct thread *td;
@@ -4383,7 +4380,7 @@
}
/*
- * thread_exit() hook.
+ * thread exit hook.
*/
void
umtx_thread_exit(struct thread *td)
Index: head/sys/sys/umtx.h
===================================================================
--- head/sys/sys/umtx.h
+++ head/sys/sys/umtx.h
@@ -188,6 +188,7 @@
}
int umtx_copyin_timeout(const void *, struct timespec *);
+void umtx_exec(struct proc *p);
int umtx_key_get(const void *, int, int, struct umtx_key *);
void umtx_key_release(struct umtx_key *);
struct umtx_q *umtxq_alloc(void);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 25, 6:54 AM (14 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35465981
Default Alt Text
D27303.id79829.diff (1 KB)
Attached To
Mode
D27303: Stop using eventhandler to invoke umtx_exec hook.
Attached
Detach File
Event Timeline
Log In to Comment