From: Greg Kroah-Hartman Date: Sat, 26 Jul 2014 18:11:08 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.4.100~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=31b9c3351c280407a5f49f71337dabe38bc56844;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: pm-sleep-fix-request_firmware-error-at-resume.patch --- diff --git a/queue-3.4/pm-sleep-fix-request_firmware-error-at-resume.patch b/queue-3.4/pm-sleep-fix-request_firmware-error-at-resume.patch new file mode 100644 index 00000000000..728c1aa3d4e --- /dev/null +++ b/queue-3.4/pm-sleep-fix-request_firmware-error-at-resume.patch @@ -0,0 +1,51 @@ +From 4320f6b1d9db4ca912c5eb6ecb328b2e090e1586 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 15 Jul 2014 08:51:27 +0200 +Subject: PM / sleep: Fix request_firmware() error at resume + +From: Takashi Iwai + +commit 4320f6b1d9db4ca912c5eb6ecb328b2e090e1586 upstream. + +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: 247bc0374254 (PM / Sleep: Mitigate race between the freezer and request_firmware()) +Link: https://bugzilla.novell.com/show_bug.cgi?id=873790 +Signed-off-by: Takashi Iwai +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/power/process.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/kernel/power/process.c ++++ b/kernel/power/process.c +@@ -185,6 +185,7 @@ void thaw_processes(void) + + printk("Restarting tasks ... "); + ++ __usermodehelper_set_disable_depth(UMH_FREEZING); + thaw_workqueues(); + + read_lock(&tasklist_lock); diff --git a/queue-3.4/series b/queue-3.4/series index 1cd20a8c969..1750ef1866d 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -19,3 +19,4 @@ perf-x86-intel-ignore-condchgd-bit-to-avoid-false-nmi-handling.patch mwifiex-fix-tx-timeout-issue.patch drm-radeon-avoid-leaking-edid-data.patch alarmtimer-fix-bug-where-relative-alarm-timers-were-treated-as-absolute.patch +pm-sleep-fix-request_firmware-error-at-resume.patch