Files
ubports_kernel_google_msm/include/linux
Tejun Heo 5d5d984e11 freezer: add missing mb's to freezer_count() and freezer_should_skip()
commit dd67d32dbc5de299d70cc9e10c6c1e29ffa56b92 upstream.

A task is considered frozen enough between freezer_do_not_count() and
freezer_count() and freezers use freezer_should_skip() to test this
condition.  This supposedly works because freezer_count() always calls
try_to_freezer() after clearing %PF_FREEZER_SKIP.

However, there currently is nothing which guarantees that
freezer_count() sees %true freezing() after clearing %PF_FREEZER_SKIP
when freezing is in progress, and vice-versa.  A task can escape the
freezing condition in effect by freezer_count() seeing !freezing() and
freezer_should_skip() seeing %PF_FREEZER_SKIP.

This patch adds smp_mb()'s to freezer_count() and
freezer_should_skip() such that either %true freezing() is visible to
freezer_count() or !PF_FREEZER_SKIP is visible to
freezer_should_skip().

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-12 14:22:54 -07:00
..
2013-03-15 17:05:25 -07:00
2011-05-23 10:47:06 -05:00
2013-03-04 12:44:09 -08:00
2013-03-15 17:08:42 -07:00
2013-03-15 17:08:42 -07:00
2013-02-08 15:04:34 -08:00
2013-03-15 17:08:42 -07:00
2013-03-15 17:24:49 -07:00
2013-06-26 16:28:49 -07:00
2013-03-04 12:45:08 -08:00
2013-03-15 17:07:24 -07:00