Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43639
b: refs/heads/master
c: f020bc4
h: refs/heads/master
i:
  43637: 78ea929
  43635: 6640a6c
  43631: a8cb7f5
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Dec 8, 2006
1 parent 94c837a commit 976c965
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84d737866e2babdeab0c6b18ea155c6a649663b8
refs/heads/master: f020bc468fe4a91d32046d448511978c7b611315
11 changes: 4 additions & 7 deletions trunk/kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -1397,16 +1397,13 @@ asmlinkage long sys_setpgid(pid_t pid, pid_t pgid)
goto out;

if (pgid != pid) {
struct task_struct *p;
struct task_struct *g =
find_task_by_pid_type(PIDTYPE_PGID, pgid);

do_each_task_pid(pgid, PIDTYPE_PGID, p) {
if (process_session(p) == process_session(group_leader))
goto ok_pgid;
} while_each_task_pid(pgid, PIDTYPE_PGID, p);
goto out;
if (!g || process_session(g) != process_session(group_leader))
goto out;
}

ok_pgid:
err = security_task_setpgid(p, pgid);
if (err)
goto out;
Expand Down

0 comments on commit 976c965

Please sign in to comment.