OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH] Add child reaper to struct pspace
Re: [RFC][PATCH] Add child reaper to struct pspace [message #16603 is a reply to message #16594] Thu, 07 September 2006 19:33 Go to previous messageGo to previous message
Sukadev Bhattiprolu is currently offline  Sukadev Bhattiprolu
Messages: 413
Registered: August 2006
Senior Member
Cedric Le Goater [clg@fr.ibm.com] wrote:
| 
| <snip>
| 
| >   */
| >  static void
| >  forget_original_parent(struct task_struct *father, struct list_head *to_release)
| > @@ -669,7 +670,7 @@ forget_original_parent(struct task_struc
| >  	do {
| >  		reaper = next_thread(reaper);
| >  		if (reaper == father) {
| > -			reaper = child_reaper;
| > +			reaper = father->pspace->child_reaper;
| >  			break;
| >  		}
| >  	} while (reaper->exit_state);
| > @@ -857,7 +858,7 @@ fastcall NORET_TYPE void do_exit(long co
| 
| what about killing all the task in that pid space if child_reaper == init
| dies ?
| 

We probably need that for instance when a process in the parent pspace 
kills the init of a child pspace, we should destroy the child pspace
by killing all the tasks in the child pspace including the child reaper.

I guess we need to maintain a list of task_structs in the pspace and walk
that list. Will work on that as a separate patch.

| 
| >  		panic("Aiee, killing interrupt handler!");
| >  	if (unlikely(!tsk->pid))
| >  		panic("Attempted to kill the idle task!");
| > -	if (unlikely(tsk == child_reaper))
| > +	if (unlikely(tsk == tsk->pspace->child_reaper))
| >  		panic("Attempted to kill init!");
| >  
| >  	if (unlikely(current->ptrace & PT_TRACE_EXIT)) {
| 
| _______________________________________________
| Containers mailing list
| Containers@lists.osdl.org
| https://lists.osdl.org/mailman/listinfo/containers
_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Re: [RFC][PATCH] Rename pspace to pid_namespace
Next Topic: Re: [RFC][PATCH 1/2] add user namespace [try #2]
Goto Forum:
  


Current Time: Sat Jul 19 01:10:04 GMT 2025

Total time taken to generate the page: 0.05568 seconds