Commit 02bdc207 authored by Andries E. Brouwer's avatar Andries E. Brouwer Committed by Linus Torvalds

[PATCH] signal error return fix

parent 36dc13b9
......@@ -907,6 +907,7 @@ asmlinkage long sys_setpgid(pid_t pid, pid_t pgid)
p = find_task_by_pid(pid);
if (!p)
goto out;
err = -EINVAL;
if (!thread_group_leader(p))
goto out;
......@@ -918,11 +919,16 @@ asmlinkage long sys_setpgid(pid_t pid, pid_t pgid)
err = -EACCES;
if (p->did_exec)
goto out;
} else if (p != current)
} else {
err = -ESRCH;
if (p != current)
goto out;
}
err = -EPERM;
if (p->leader)
goto out;
if (pgid != pid) {
struct task_struct *p;
struct pid *pid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment