* [PATCH 3/4] pids: sys_setpgid: use change_pid() helper
@ 2008-03-20 15:28 Oleg Nesterov
0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2008-03-20 15:28 UTC (permalink / raw)
To: Andrew Morton
Cc: Eric W. Biederman, Pavel Emelyanov, Roland McGrath, linux-kernel
Use change_pid() instead of detach_pid() + attach_pid() in sys_setpgid().
This way task_pgrp() is not NULL in between.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- 25/kernel/sys.c~3_SETPGRP 2008-02-18 19:15:40.000000000 +0300
+++ 25/kernel/sys.c 2008-03-20 18:21:17.000000000 +0300
@@ -972,8 +972,7 @@ asmlinkage long sys_setpgid(pid_t pid, p
goto out;
if (task_pgrp(p) != pgrp) {
- detach_pid(p, PIDTYPE_PGID);
- attach_pid(p, PIDTYPE_PGID, pgrp);
+ change_pid(p, PIDTYPE_PGID, pgrp);
set_task_pgrp(p, pid_nr(pgrp));
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-20 15:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-20 15:28 [PATCH 3/4] pids: sys_setpgid: use change_pid() helper Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®