OpenVZ Forum


Home » Mailing lists » Devel » + explicitly-set-pgid-sid-of-init.patch added to -mm tree
+ explicitly-set-pgid-sid-of-init.patch added to -mm tree [message #17326] Thu, 25 January 2007 03:51
Andrew Morton is currently offline  Andrew Morton
Messages: 127
Registered: December 2005
Senior Member
The patch titled
     Explicitly set pgid/sid of init
has been added to the -mm tree.  Its filename is
     explicitly-set-pgid-sid-of-init.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: Explicitly set pgid/sid of init
From: Sukadev Bhattiprolu <sukadev@us.ibm.com>

Explicitly set pgid and sid of init process to 1.

Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: <containers@lists.osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 init/main.c   |    1 +
 kernel/exit.c |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff -puN init/main.c~explicitly-set-pgid-sid-of-init init/main.c
--- a/init/main.c~explicitly-set-pgid-sid-of-init
+++ a/init/main.c
@@ -769,6 +769,7 @@ static int __init init(void * unused)
 	 */
 	init_pid_ns.child_reaper = current;
 
+	__set_special_pids(1, 1);
 	cad_pid = task_pid(current);
 
 	smp_prepare_cpus(max_cpus);
diff -puN kernel/exit.c~explicitly-set-pgid-sid-of-init kernel/exit.c
--- a/kernel/exit.c~explicitly-set-pgid-sid-of-init
+++ a/kernel/exit.c
@@ -297,12 +297,12 @@ void __set_special_pids(pid_t session, p
 {
 	struct task_struct *curr = current->group_leader;
 
-	if (process_session(curr) != session) {
+	if (pid_nr(task_session(curr)) != session) {
 		detach_pid(curr, PIDTYPE_SID);
 		set_signal_session(curr->signal, session);
 		attach_pid(curr, PIDTYPE_SID, find_pid(session));
 	}
-	if (process_group(curr) != pgrp) {
+	if (pid_nr(task_pgrp(curr)) != pgrp) {
 		detach_pid(curr, PIDTYPE_PGID);
 		curr->signal->pgrp = pgrp;
 		attach_pid(curr, PIDTYPE_PGID, find_pid(pgrp));
_

Patches currently in -mm which might be from sukadev@us.ibm.com are

rename-attach_pid-to-find_attach_pid.patch
attach_pid-with-struct-pid-parameter.patch
remove-find_attach_pid.patch
statically-initialize-struct-pid-for-swapper.patch
explicitly-set-pgid-sid-of-init.patch

_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
Previous Topic: Re: [PATCH 2/2] Implement shadow directory support for device classes.
Next Topic: [RFC][PATCH 2/3] Replace pid_t in autofs4 with struct pid reference
Goto Forum:
  


Current Time: Sat Sep 14 21:00:20 GMT 2024

Total time taken to generate the page: 0.03780 seconds