PM / Sleep: Move disabling of usermode helpers to the freezer
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 28 Mar 2012 21:30:21 +0000 (23:30 +0200)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 18 Apr 2012 13:07:34 +0000 (18:07 +0530)
commit3a50d233e60d00ac42731037c628c66087802f25
tree9f4d8b5a8e02b2e970aff569a421ab8d5c234be4
parent99bc23ff7ccc02c14e6205a0df6824f711090fe9
PM / Sleep: Move disabling of usermode helpers to the freezer

The core suspend/hibernation code calls usermodehelper_disable() to
avoid race conditions between the freezer and the starting of
usermode helpers and each code path has to do that on its own.
However, it is always called right before freeze_processes()
and usermodehelper_enable() is always called right after
thaw_processes().  For this reason, to avoid code duplication and
to make the connection between usermodehelper_disable() and the
freezer more visible, make freeze_processes() call it and remove the
direct usermodehelper_disable() and usermodehelper_enable() calls
from all suspend/hibernation code paths.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org
kernel/power/hibernate.c
kernel/power/process.c
kernel/power/suspend.c
kernel/power/user.c