This is a note to let you know that I've just added the patch titled
firmware loader: allow builtin firmware load even if usermodehelper is
disabled
to the 2.6.32-longterm tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.32.git;a=summary
The filename of the patch is:
firmware-loader-allow-builtin-firmware-load-even-if-usermodehelper-is-disabled.patch
and it can be found in the queue-2.6.32 subdirectory.
If you, or anyone else, feels it should not be added to the 2.6.32 longterm
tree,
please let <[email protected]> know about it.
>From [email protected] Thu Mar 1 13:31:42 2012
From: "Srivatsa S. Bhat" <[email protected]>
Date: Wed, 29 Feb 2012 12:23:20 +0530
Subject: firmware loader: allow builtin firmware load even if usermodehelper is
disabled
To: [email protected]
Cc: [email protected], [email protected], [email protected],
[email protected], [email protected], [email protected],
[email protected], [email protected]
Message-ID: <[email protected]>
From: Linus Torvalds <[email protected]>
[ Upstream commit caca9510ff4e5d842c0589110243d60927836222 ]
In commit a144c6a6c924 ("PM: Print a warning if firmware is requested
when tasks are frozen") we not only printed a warning if somebody tried
to load the firmware when tasks are frozen - we also failed the load.
But that check was done before the check for built-in firmware, and then
when we disallowed usermode helpers during bootup (commit 288d5abec831:
"Boot up with usermodehelper disabled"), that actually means that
built-in modules can no longer load their firmware even if the firmware
is built in too. Which used to work, and some people depended on it for
the R100 driver.
So move the test for usermodehelper_is_disabled() down, to after
checking the built-in firmware.
This should fix:
https://bugzilla.kernel.org/show_bug.cgi?id=40952
Reported-by: James Cloos <[email protected]>
Bisected-by: Elimar Riesebieter <[email protected]>
Cc: Michel Dänzer <[email protected]>
Cc: Rafael Wysocki <[email protected]>
Cc: Valdis Kletnieks <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Srivatsa S. Bhat <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/base/firmware_class.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -489,11 +489,6 @@ _request_firmware(const struct firmware
if (!firmware_p)
return -EINVAL;
- if (WARN_ON(usermodehelper_is_disabled())) {
- dev_err(device, "firmware: %s will not be loaded\n", name);
- return -EBUSY;
- }
-
*firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL);
if (!firmware) {
dev_err(device, "%s: kmalloc(struct firmware) failed\n",
@@ -513,6 +508,12 @@ _request_firmware(const struct firmware
return 0;
}
+ if (WARN_ON(usermodehelper_is_disabled())) {
+ dev_err(device, "firmware: %s will not be loaded\n", name);
+ retval = -EBUSY;
+ goto out;
+ }
+
if (uevent)
dev_info(device, "firmware: requesting %s\n", name);
Patches currently in longterm-queue-2.6.32 which might be from
[email protected] are
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/pm-sleep-fix-read_unlock_usermodehelper-call.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/firmware-loader-allow-builtin-firmware-load-even-if-usermodehelper-is-disabled.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/pm-print-a-warning-if-firmware-is-requested-when-tasks.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/pm-sleep-fix-freezer-failures-due-to-racy-usermodehelper_is_disabled.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html