Re: [PATCH] cgroup: fix a race condition in manipulating tsk->cg_list

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Li Zefan <lizf@...>
Cc: Andrew Morton <akpm@...>, Linus Torvalds <torvalds@...>, LKML <linux-kernel@...>, Linux Containers <containers@...>, Balbir Singh <balbir@...>, KAMEZAWA Hiroyuki <kamezawa.hiroyu@...>, Paul Jackson <pj@...>
Date: Thursday, April 17, 2008 - 12:18 am

On Wed, Apr 16, 2008 at 8:37 PM, Li Zefan <lizf@cn.fujitsu.com> wrote:

Yes, that looks like it could be the same one - great. But this
corruption can only be triggered the first time you cat a tasks file
after a reboot, right? That would partly explain why it was hard to
reproduce (at least, I had trouble).

My only thought about the downside of this is that an exiting task
that gets stuck somewhere  between setting PF_EXITING and calling
cgroup_exit() won't show up in its cgroup's tasks file, since we'll
enable cgroup links but skip it. I guess that's not a big deal.

Maybe it would be better to not do a cgroup_exit() until we're
unhashed, so that cgroup_enable_task_cg_list() can't find the exiting
task?

Paul
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] cgroup: fix a race condition in manipulating tsk..., Paul Menage, (Thu Apr 17, 12:18 am)