summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2010-07-26 01:56:27 +0000
committerguenther <guenther@openbsd.org>2010-07-26 01:56:27 +0000
commit207e4b38a785bf665de26471f4fc5fde67fa99f0 (patch)
tree5b61a93df6c22438e6a0955afca220cb2f2207a0 /sys/compat/linux/linux_misc.c
parentAdd missing braces so a loop will function as intended. (diff)
downloadwireguard-openbsd-207e4b38a785bf665de26471f4fc5fde67fa99f0.tar.xz
wireguard-openbsd-207e4b38a785bf665de26471f4fc5fde67fa99f0.zip
Correct the links between threads, processes, pgrps, and sessions,
so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r--sys/compat/linux/linux_misc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 5def1551993..cb7abec8993 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_misc.c,v 1.64 2010/06/30 21:54:35 guenther Exp $ */
+/* $OpenBSD: linux_misc.c,v 1.65 2010/07/26 01:56:27 guenther Exp $ */
/* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */
/*-
@@ -1223,16 +1223,16 @@ linux_sys_getpgid(p, v, retval)
struct linux_sys_getpgid_args /* {
syscallarg(int) pid;
} */ *uap = v;
- struct proc *targp;
+ struct process *targpr;
if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) {
- if ((targp = pfind(SCARG(uap, pid))) == 0)
+ if ((targpr = prfind(SCARG(uap, pid))) == 0)
return ESRCH;
}
else
- targp = p;
+ targpr = p->p_p;
- retval[0] = targp->p_pgid;
+ retval[0] = targpr->ps_pgid;
return 0;
}