diff options
author | netchild <netchild@FreeBSD.org> | 2007-01-07 19:14:06 +0000 |
---|---|---|
committer | netchild <netchild@FreeBSD.org> | 2007-01-07 19:14:06 +0000 |
commit | e7d3b7ff43d56e2d2d1d3e4c5bbae835f1e78db7 (patch) | |
tree | 35612e9db7798739a7d48ae365207d403f7abcbc /sys/compat/linux/linux_misc.c | |
parent | 10ec776aee8b4bf7ab4e9506ccb9af366e7bcb86 (diff) | |
download | FreeBSD-src-e7d3b7ff43d56e2d2d1d3e4c5bbae835f1e78db7.zip FreeBSD-src-e7d3b7ff43d56e2d2d1d3e4c5bbae835f1e78db7.tar.gz |
MFp4 (112534):
Dont lock em in a case of just using em->shared->group_pid because
the group_pid never changes.
Submitted by: rdivacky
Reviewed by: kib
Glanced at by: jhb
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index ff08e67..a09f691 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1439,10 +1439,9 @@ linux_getpid(struct thread *td, struct linux_getpid_args *args) #endif if (linux_use26(td)) { - em = em_find(td->td_proc, EMUL_DOLOCK); + em = em_find(td->td_proc, EMUL_DONTLOCK); KASSERT(em != NULL, ("getpid: emuldata not found.\n")); td->td_retval[0] = em->shared->group_pid; - EMUL_UNLOCK(&emul_lock); } else { td->td_retval[0] = td->td_proc->p_pid; } @@ -1481,7 +1480,7 @@ linux_getppid(struct thread *td, struct linux_getppid_args *args) return (0); } - em = em_find(td->td_proc, EMUL_DOLOCK); + em = em_find(td->td_proc, EMUL_DONTLOCK); KASSERT(em != NULL, ("getppid: process emuldata not found.\n")); @@ -1508,7 +1507,6 @@ linux_getppid(struct thread *td, struct linux_getppid_args *args) } else td->td_retval[0] = pp->p_pid; - EMUL_UNLOCK(&emul_lock); PROC_UNLOCK(pp); return (0); |