summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/linux32/linux32_machdep.c2
-rw-r--r--sys/compat/linux/linux_emul.c18
-rw-r--r--sys/compat/linux/linux_emul.h4
-rw-r--r--sys/compat/linux/linux_misc.c12
-rw-r--r--sys/compat/linux/linux_signal.c2
-rw-r--r--sys/i386/linux/linux_machdep.c2
6 files changed, 20 insertions, 20 deletions
diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c
index a378c22..7a164863 100644
--- a/sys/amd64/linux32/linux32_machdep.c
+++ b/sys/amd64/linux32/linux32_machdep.c
@@ -564,7 +564,7 @@ linux_clone(struct thread *td, struct linux_clone_args *args)
/* create the emuldata */
error = linux_proc_init(td, p2->p_pid, args->flags);
/* reference it - no need to check this */
- em = em_find(p2, EMUL_UNLOCKED);
+ em = em_find(p2, EMUL_DOLOCK);
KASSERT(em != NULL, ("clone: emuldata not found.\n"));
/* and adjust it */
if (args->flags & CLONE_PARENT_SETTID) {
diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c
index 0240094..4083f53 100644
--- a/sys/compat/linux/linux_emul.c
+++ b/sys/compat/linux/linux_emul.c
@@ -63,12 +63,12 @@ em_find(struct proc *p, int locked)
{
struct linux_emuldata *em;
- if (locked == EMUL_UNLOCKED)
+ if (locked == EMUL_DOLOCK)
EMUL_LOCK(&emul_lock);
em = p->p_emuldata;
- if (em == NULL && locked == EMUL_UNLOCKED)
+ if (em == NULL && locked == EMUL_DOLOCK)
EMUL_UNLOCK(&emul_lock);
return (em);
@@ -104,7 +104,7 @@ linux_proc_init(struct thread *td, pid_t child, int flags)
EMUL_LOCK(&emul_lock);
} else {
/* lookup the old one */
- em = em_find(td->td_proc, EMUL_UNLOCKED);
+ em = em_find(td->td_proc, EMUL_DOLOCK);
KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n"));
}
@@ -119,7 +119,7 @@ linux_proc_init(struct thread *td, pid_t child, int flags)
if (child != 0) {
if (flags & CLONE_THREAD) {
/* lookup the parent */
- p_em = em_find(td->td_proc, EMUL_LOCKED);
+ p_em = em_find(td->td_proc, EMUL_DONTLOCK);
KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_THREAD\n"));
em->shared = p_em->shared;
em->shared->refs++;
@@ -159,7 +159,7 @@ linux_proc_exit(void *arg __unused, struct proc *p)
return;
/* find the emuldata */
- em = em_find(p, EMUL_UNLOCKED);
+ em = em_find(p, EMUL_DOLOCK);
KASSERT(em != NULL, ("proc_exit: emuldata not found.\n"));
@@ -217,7 +217,7 @@ linux_proc_exit(void *arg __unused, struct proc *p)
continue;
if (__predict_false(q->p_sysent != &elf_linux_sysvec))
continue;
- em = em_find(q, EMUL_UNLOCKED);
+ em = em_find(q, EMUL_DOLOCK);
KASSERT(em != NULL, ("linux_reparent: emuldata not found: %i\n", q->p_pid));
if (em->pdeath_signal != 0) {
PROC_LOCK(q);
@@ -244,7 +244,7 @@ linux_proc_exec(void *arg __unused, struct proc *p, struct image_params *imgp)
&& p->p_sysent == &elf_linux_sysvec)) {
struct linux_emuldata *em;
- em = em_find(p, EMUL_UNLOCKED);
+ em = em_find(p, EMUL_DOLOCK);
KASSERT(em != NULL, ("proc_exec: emuldata not found.\n"));
@@ -280,7 +280,7 @@ linux_schedtail(void *arg __unused, struct proc *p)
retry:
/* find the emuldata */
- em = em_find(p, EMUL_UNLOCKED);
+ em = em_find(p, EMUL_DOLOCK);
if (em == NULL) {
/*
@@ -315,7 +315,7 @@ linux_set_tid_address(struct thread *td, struct linux_set_tid_address_args *args
#endif
/* find the emuldata */
- em = em_find(td->td_proc, EMUL_UNLOCKED);
+ em = em_find(td->td_proc, EMUL_DOLOCK);
KASSERT(em != NULL, ("set_tid_address: emuldata not found.\n"));
diff --git a/sys/compat/linux/linux_emul.h b/sys/compat/linux/linux_emul.h
index 2f9fc98..d1e82eb 100644
--- a/sys/compat/linux/linux_emul.h
+++ b/sys/compat/linux/linux_emul.h
@@ -66,8 +66,8 @@ struct linux_emuldata *em_find(struct proc *, int locked);
#define EMUL_SHARED_WUNLOCK(l) sx_xunlock(l)
/* for em_find use */
-#define EMUL_LOCKED 1
-#define EMUL_UNLOCKED 0
+#define EMUL_DOLOCK 1
+#define EMUL_DONTLOCK 0
int linux_proc_init(struct thread *, pid_t, int);
void linux_proc_exit(void *, struct proc *);
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index e137e6b..ff08e67 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1439,7 +1439,7 @@ linux_getpid(struct thread *td, struct linux_getpid_args *args)
#endif
if (linux_use26(td)) {
- em = em_find(td->td_proc, EMUL_UNLOCKED);
+ em = em_find(td->td_proc, EMUL_DOLOCK);
KASSERT(em != NULL, ("getpid: emuldata not found.\n"));
td->td_retval[0] = em->shared->group_pid;
EMUL_UNLOCK(&emul_lock);
@@ -1481,7 +1481,7 @@ linux_getppid(struct thread *td, struct linux_getppid_args *args)
return (0);
}
- em = em_find(td->td_proc, EMUL_UNLOCKED);
+ em = em_find(td->td_proc, EMUL_DOLOCK);
KASSERT(em != NULL, ("getppid: process emuldata not found.\n"));
@@ -1501,7 +1501,7 @@ linux_getppid(struct thread *td, struct linux_getppid_args *args)
/* if its also linux process */
if (pp->p_sysent == &elf_linux_sysvec) {
- em = em_find(pp, EMUL_LOCKED);
+ em = em_find(pp, EMUL_DONTLOCK);
KASSERT(em != NULL, ("getppid: parent emuldata not found.\n"));
td->td_retval[0] = em->shared->group_pid;
@@ -1608,7 +1608,7 @@ linux_exit_group(struct thread *td, struct linux_exit_group_args *args)
#endif
if (linux_use26(td)) {
- td_em = em_find(td->td_proc, EMUL_UNLOCKED);
+ td_em = em_find(td->td_proc, EMUL_DOLOCK);
KASSERT(td_em != NULL, ("exit_group: emuldata not found.\n"));
@@ -1656,13 +1656,13 @@ linux_prctl(struct thread *td, struct linux_prctl_args *args)
case LINUX_PR_SET_PDEATHSIG:
if (!LINUX_SIG_VALID(args->arg2))
return (EINVAL);
- em = em_find(p, EMUL_UNLOCKED);
+ em = em_find(p, EMUL_DOLOCK);
KASSERT(em != NULL, ("prctl: emuldata not found.\n"));
em->pdeath_signal = args->arg2;
EMUL_UNLOCK(&emul_lock);
break;
case LINUX_PR_GET_PDEATHSIG:
- em = em_find(p, EMUL_UNLOCKED);
+ em = em_find(p, EMUL_DOLOCK);
KASSERT(em != NULL, ("prctl: emuldata not found.\n"));
error = copyout(&em->pdeath_signal,
(void *)(register_t)args->arg2,
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c
index 7a6c9e6..c9904a8 100644
--- a/sys/compat/linux/linux_signal.c
+++ b/sys/compat/linux/linux_signal.c
@@ -561,7 +561,7 @@ linux_tgkill(struct thread *td, struct linux_tgkill_args *args)
PROC_UNLOCK(p);
- em = em_find(p, EMUL_UNLOCKED);
+ em = em_find(p, EMUL_DOLOCK);
if (em == NULL) {
#ifdef DEBUG
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c
index 0129bd0..8ff50e1 100644
--- a/sys/i386/linux/linux_machdep.c
+++ b/sys/i386/linux/linux_machdep.c
@@ -408,7 +408,7 @@ linux_clone(struct thread *td, struct linux_clone_args *args)
/* create the emuldata */
error = linux_proc_init(td, p2->p_pid, args->flags);
/* reference it - no need to check this */
- em = em_find(p2, EMUL_UNLOCKED);
+ em = em_find(p2, EMUL_DOLOCK);
KASSERT(em != NULL, ("clone: emuldata not found.\n"));
/* and adjust it */
if (args->flags & CLONE_PARENT_SETTID) {
OpenPOWER on IntegriCloud