android_kernel_motorola_sm6375/kernel/power
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Takashi Iwai 4320f6b1d9 PM / sleep: Fix request_firmware() error at resume
The commit [247bc037: PM / Sleep: Mitigate race between the freezer
and request_firmware()] introduced the finer state control, but it
also leads to a new bug; for example, a bug report regarding the
firmware loading of intel BT device at suspend/resume:
  https://bugzilla.novell.com/show_bug.cgi?id=873790

The root cause seems to be a small window between the process resume
and the clear of usermodehelper lock.  The request_firmware() function
checks the UMH lock and gives up when it's in UMH_DISABLE state.  This
is for avoiding the invalid  f/w loading during suspend/resume phase.
The problem is, however, that usermodehelper_enable() is called at the
end of thaw_processes().  Thus, a thawed process in between can kick
off the f/w loader code path (in this case, via btusb_setup_intel())
even before the call of usermodehelper_enable().  Then
usermodehelper_read_trylock() returns an error and request_firmware()
spews WARN_ON() in the end.

This oneliner patch fixes the issue just by setting to UMH_FREEZING
state again before restarting tasks, so that the call of
request_firmware() will be blocked until the end of this function
instead of returning an error.

Fixes: 247bc03742 (PM / Sleep: Mitigate race between the freezer and request_firmware())
Link: https://bugzilla.novell.com/show_bug.cgi?id=873790
Cc: 3.4+ <stable@vger.kernel.org> # 3.4+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-15 14:27:29 +02:00
..
autosleep.c
block_io.c
console.c
hibernate.c x86, kaslr: boot-time selectable with hibernation 2014-06-16 23:30:44 +02:00
Kconfig PM / OPP: Make OPP invisible to users in Kconfig 2014-05-19 23:03:31 +02:00
main.c PM / hibernate: introduce "nohibernate" boot parameter 2014-06-16 23:29:39 +02:00
Makefile
power.h PM / sleep: Use valid_state() for platform-dependent sleep states only 2014-05-26 13:40:53 +02:00
poweroff.c
process.c PM / sleep: Fix request_firmware() error at resume 2014-07-15 14:27:29 +02:00
qos.c PM / QoS: Introcuce latency tolerance device PM QoS type 2014-02-11 00:35:38 +01:00
snapshot.c asmlinkage: Add explicit __visible to drivers/*, lib/*, kernel/* 2014-05-05 16:07:46 -07:00
suspend.c PM / sleep: trace events for suspend/resume 2014-06-07 00:18:07 +02:00
suspend_test.c PM / sleep: Use valid_state() for platform-dependent sleep states only 2014-05-26 13:40:53 +02:00
swap.c PM / hibernate: fixed typo in comment 2014-06-01 00:23:07 +02:00
user.c PM / hibernate: introduce "nohibernate" boot parameter 2014-06-16 23:29:39 +02:00
wakelock.c PM / wakeup: Include appropriate header file in kernel/power/wakelock.c 2014-03-01 01:02:09 +01:00