]> git.baikalelectronics.ru Git - kernel.git/commit
freezer_cg: remove task_lock from freezer_fork()
authorLi Zefan <lizf@cn.fujitsu.com>
Wed, 12 Nov 2008 21:26:49 +0000 (13:26 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Nov 2008 01:17:16 +0000 (17:17 -0800)
commit97472c1176f4984a59ec1b88ae1d9e6dac07ed36
treeb4834a1e88d98234cfad90a0880b54ba1cc3cc59
parent34073ce84d05df2f98b0ff7cc4c14396098470bc
freezer_cg: remove task_lock from freezer_fork()

In theory the task can be moved to another cgroup and the freezer will be
freed right after task_lock is dropped, so the lock results in zero
protection.

But in the case of freezer_fork() no lock is needed, since the task is not
in tasklist yet so it won't be moved to another cgroup, so task->cgroups
won't be changed or invalidated.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Matt Helsley <matthltc@us.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/cgroup_freezer.c