* [PATCH 3/4] pids: __set_special_pids: 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 __set_special_pids()
This way task_session() is not NULL in between.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- 25/kernel/exit.c~4_SETSID 2008-03-16 19:41:42.000000000 +0300
+++ 25/kernel/exit.c 2008-03-20 18:25:11.000000000 +0300
@@ -334,13 +334,11 @@ void __set_special_pids(struct pid *pid)
pid_t nr = pid_nr(pid);
if (task_session(curr) != pid) {
- detach_pid(curr, PIDTYPE_SID);
- attach_pid(curr, PIDTYPE_SID, pid);
+ change_pid(curr, PIDTYPE_SID, pid);
set_task_session(curr, nr);
}
if (task_pgrp(curr) != pid) {
- detach_pid(curr, PIDTYPE_PGID);
- attach_pid(curr, PIDTYPE_PGID, pid);
+ change_pid(curr, PIDTYPE_PGID, pid);
set_task_pgrp(curr, nr);
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-20 15:23 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: __set_special_pids: 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®