PM / Sleep: Move disabling of usermode helpers to the freezer
commit7b9643c970c77db6ab8cc7760b7e2cc2e4daface
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 28 Mar 2012 21:30:21 +0000 (28 23:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2012 16:13:54 +0000 (13 09:13 -0700)
treee8cdcf89860c2f79fdfea16e1127181502e1849c
parent9bd3f435bb77d55c195b254d5c7f1f21e6a0669a
PM / Sleep: Move disabling of usermode helpers to the freezer

commit 1e73203cd1157a03facc41ffb54050f5b28e55bd upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/power/hibernate.c
kernel/power/process.c
kernel/power/suspend.c
kernel/power/user.c