Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic container system abstracted from cpusets code

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Srivatsa Vaddagiri
Date: Saturday, March 24, 2007 - 8:05 am

On Mon, Feb 12, 2007 at 12:15:22AM -0800, menage@google.com wrote:

This is probably carrying over code from cpuset.c, but :

/me thinks that there is a ugly race here with 'tsk' exiting.
What happens if the tsk is marked PF_EXITING just after this check?
If that happens, then:


Above assignment A1 can race with below assignment A2 in container_exit() :

	tsk->container = &top_container; /* the_top_container_hack - see above */

What happens if A1 follows after A2? I feel very uncomfortable abt it.

IMO, we need to use task_lock() in container_exit() to avoid this race.

(I think this race already exists in mainline cpuset.c?)

P.S : cpuset.c checks for PF_EXITING twice in attach_task(), while this
patch seems to be checking only once. Is that fine?


-- 
Regards,
vatsa
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 1/7] containers (V7): Generic container system ..., Srivatsa Vaddagiri, (Mon Feb 12, 5:33 am)
Re: [PATCH 1/7] containers (V7): Generic container system ..., Srivatsa Vaddagiri, (Mon Feb 12, 10:48 pm)
Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic conta ..., Srivatsa Vaddagiri, (Tue Feb 13, 1:16 am)
Re: [PATCH 1/7] containers (V7): Generic container system ..., Srivatsa Vaddagiri, (Wed Mar 7, 5:21 am)
Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic conta ..., Srivatsa Vaddagiri, (Wed Mar 7, 7:06 am)
Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic conta ..., Srivatsa Vaddagiri, (Thu Mar 8, 3:38 am)
Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic conta ..., Srivatsa Vaddagiri, (Mon Mar 12, 7:19 am)
Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic conta ..., Srivatsa Vaddagiri, (Thu Mar 22, 2:56 am)
Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic conta ..., Srivatsa Vaddagiri, (Thu Mar 22, 3:20 am)
Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic conta ..., Srivatsa Vaddagiri, (Sat Mar 24, 8:05 am)
Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic conta ..., Srivatsa Vaddagiri, (Sat Mar 24, 5:45 pm)
Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic conta ..., Srivatsa Vaddagiri, (Sat Mar 24, 7:28 pm)
Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic conta ..., Srivatsa Vaddagiri, (Sat Mar 24, 9:16 pm)
Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic conta ..., Srivatsa Vaddagiri, (Sat Mar 24, 10:05 pm)
Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic conta ..., Srivatsa Vaddagiri, (Sun Mar 25, 1:21 am)