OpenVZ Forum


Home » Mailing lists » Devel » Re: [PATCH 3/7] Containers (V8): Add generic multi-subsystem API to containers
Re: [PATCH 3/7] Containers (V8): Add generic multi-subsystem API to containers [message #11809] Sat, 07 April 2007 04:11 Go to previous message
Srivatsa Vaddagiri is currently offline  Srivatsa Vaddagiri
Messages: 241
Registered: August 2006
Senior Member
On Fri, Apr 06, 2007 at 04:32:24PM -0700, menage@google.com wrote:
> +static int attach_task(struct container *cont, struct task_struct *tsk)
> {

[snip]

> + task_lock(tsk);

You need to check here if task state is PF_EXITING and fail with
-ESRCH if so? Otherwise we risk breaking refcount on
init_container_group.

> + rcu_assign_pointer(tsk->containers, newcg);
> + task_unlock(tsk);

--
Regards,
vatsa
 
Read Message
Read Message
Previous Topic: i/o accounting in 2.6.18 openvz :: show_io_stats
Next Topic: Re: [PATCH] net: Add etun driver
Goto Forum:
  


Current Time: Fri Sep 13 21:42:30 GMT 2024

Total time taken to generate the page: 0.04728 seconds