From: Oleg Nesterov Date: Fri, 8 Feb 2008 12:19:09 +0000 (-0800) Subject: fix setsid() for sub-namespace /sbin/init X-Git-Tag: v2.6.25-rc1~220 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4cc0a9c876d4d4eadaef97a2bff4a199946d202;p=pandora-kernel.git fix setsid() for sub-namespace /sbin/init sys_setsid() still deals with pid_t's from the global namespace. This means that the "session > 1" check can't help for sub-namespace init, setsid() can't succeed because copy_process(CLONE_NEWPID) populates PIDTYPE_PGID/SID links. Remove the usage of task_struct->pid and convert the code to use "struct pid". This also simplifies and speedups the code, saves one find_pid(). Signed-off-by: Oleg Nesterov Cc: "Eric W. Biederman" Acked-by: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed