]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/exit.c
pids: improve get_task_pid() to fix the unsafe sys_wait4()->task_pgrp()
[linux-2.6-omap-h63xx.git] / kernel / exit.c
index 029415d9f82e2f5895933b04d67cda5da06b137c..384f09caf2ef4ecbcd3cdfdc5ebadd44f6c7f4f6 100644 (file)
@@ -1737,7 +1737,7 @@ SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr,
                pid = find_get_pid(-upid);
        } else if (upid == 0) {
                type = PIDTYPE_PGID;
-               pid = get_pid(task_pgrp(current));
+               pid = get_task_pid(current, PIDTYPE_PGID);
        } else /* upid > 0 */ {
                type = PIDTYPE_PID;
                pid = find_get_pid(upid);