Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168118846
D1463.id5658.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
D1463.id5658.diff
View Options
Index: head/sys/compat/linux/linux_emul.c
===================================================================
--- head/sys/compat/linux/linux_emul.c
+++ head/sys/compat/linux/linux_emul.c
@@ -85,8 +85,11 @@
struct linux_emuldata *em;
struct linux_pemuldata *pem;
struct epoll_emuldata *emd;
+ struct proc *p;
if (newtd != NULL) {
+ p = newtd->td_proc;
+
/* non-exec call */
em = malloc(sizeof(*em), M_TEMP, M_WAITOK | M_ZERO);
if (flags & LINUX_CLONE_THREAD) {
@@ -95,26 +98,26 @@
em->em_tid = newtd->td_tid;
} else {
- LINUX_CTR1(proc_init, "fork newtd(%d)",
- newtd->td_proc->p_pid);
+ LINUX_CTR1(proc_init, "fork newtd(%d)", p->p_pid);
- em->em_tid = newtd->td_proc->p_pid;
+ em->em_tid = p->p_pid;
pem = malloc(sizeof(*pem), M_LINUX, M_WAITOK | M_ZERO);
sx_init(&pem->pem_sx, "lpemlk");
- newtd->td_proc->p_emuldata = pem;
+ p->p_emuldata = pem;
}
newtd->td_emuldata = em;
} else {
+ p = td->td_proc;
+
/* exec */
- LINUX_CTR1(proc_init, "exec newtd(%d)",
- td->td_proc->p_pid);
+ LINUX_CTR1(proc_init, "exec newtd(%d)", p->p_pid);
/* lookup the old one */
em = em_find(td);
KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n"));
- em->em_tid = td->td_proc->p_pid;
+ em->em_tid = p->p_pid;
em->flags = 0;
em->pdeath_signal = 0;
em->robust_futexes = NULL;
@@ -122,7 +125,7 @@
em->child_set_tid = NULL;
/* epoll should be destroyed in a case of exec. */
- pem = pem_find(td->td_proc);
+ pem = pem_find(p);
KASSERT(pem != NULL, ("proc_exit: proc emuldata not found.\n"));
if (pem->epoll != NULL) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 27, 11:33 AM (21 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37380013
Default Alt Text
D1463.id5658.diff (1 KB)
Attached To
Mode
D1463: Linuxulator. Small optimization.
Attached
Detach File
Event Timeline
Log In to Comment