aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorTomasz Buchert <[email protected]>2010-10-27 15:33:34 -0700
committerLinus Torvalds <[email protected]>2010-10-27 18:03:08 -0700
commit2d3cbf8bc852ac1bc3d098186143c5973f87b753 (patch)
tree5507f0efa192ac6df884fb0118bfd0e28d758662 /tools/perf/scripts/python
parent0bdba580ab052a21e3eda2764ed22d9ee962392b (diff)
cgroup_freezer: update_freezer_state() does incorrect state transitions
There are 4 state transitions possible for a freezer. Only FREEZING -> FROZEN transaction is done lazily. This patch allows update_freezer_state only to perform this transaction and renames the function to update_if_frozen. Moreover is_task_frozen_enough function is removed and its every occurence is replaced with frozen(). Therefore for a group to become FROZEN every task must be frozen. The previous version could trigger a following bug: When cgroup is in the process of freezing (but none of its tasks are frozen yet), update_freezer_state() (called from freezer_read or freezer_write) would incorrectly report that a group is 'THAWED' (because nfrozen = 0), allowing the transaction FREEZING -> THAWED without writing anything to 'freezer.state'. This is incorrect according to the documentation. This could result in a 'THAWED' cgroup with frozen tasks inside. A code to reproduce this bug is available here: http://pentium.hopto.org/~thinred/repos/linux-misc/freezer_bug2.c [[email protected]: coding-style fixes] Signed-off-by: Tomasz Buchert <[email protected]> Cc: Matt Helsley <[email protected]> Cc: Paul Menage <[email protected]> Cc: Li Zefan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions