diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-27 15:53:49 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-27 15:53:49 -0700 |
commit | 26268a379faae04c977e6b7f5258864b5090ad59 (patch) | |
tree | 33a98ee49dd99b46e857bc7d40af8b7818611a72 | |
parent | ae0248a2dfd4a13628700b0830c542983db5d7e6 (diff) | |
download | stable-queue-26268a379faae04c977e6b7f5258864b5090ad59.tar.gz |
3.0 patches
4 files changed, 78 insertions, 71 deletions
diff --git a/queue-3.0/firmware-loader-allow-builtin-firmware-load-even-if.patch b/queue-3.0/firmware-loader-allow-builtin-firmware-load-even-if.patch new file mode 100644 index 0000000000..189e987658 --- /dev/null +++ b/queue-3.0/firmware-loader-allow-builtin-firmware-load-even-if.patch @@ -0,0 +1,73 @@ +From caca9510ff4e5d842c0589110243d60927836222 Mon Sep 17 00:00:00 2001 +From: Linus Torvalds <torvalds@linux-foundation.org> +Date: Wed, 24 Aug 2011 15:55:30 -0700 +Subject: firmware loader: allow builtin firmware load even if + usermodehelper is disabled +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Linus Torvalds <torvalds@linux-foundation.org> + +commit caca9510ff4e5d842c0589110243d60927836222 upstream. + +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 <cloos@hjcloos.com> +Bisected-by: Elimar Riesebieter <riesebie@lxtec.de> +Cc: Michel Dänzer <michel@daenzer.net> +Cc: Rafael Wysocki <rjw@sisk.pl> +Cc: Greg Kroah-Hartman <gregkh@suse.de> +Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu> +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +Cc: Borislav Petkov <bp@alien8.de> +Cc: Lucas Villa Real <lucasvr@gobolinux.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + 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 +@@ -521,11 +521,6 @@ static int _request_firmware(const struc + 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", +@@ -539,6 +534,12 @@ static int _request_firmware(const struc + 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_dbg(device, "firmware: requesting %s\n", name); + diff --git a/queue-3.0/restore-pinning-the-victim-dentry-in-vfs_rmdir-vfs_rename_dir.patch b/queue-3.0/restore-pinning-the-victim-dentry-in-vfs_rmdir-vfs_rename_dir.patch index 0e9e145b8f..81fa541c4b 100644 --- a/queue-3.0/restore-pinning-the-victim-dentry-in-vfs_rmdir-vfs_rename_dir.patch +++ b/queue-3.0/restore-pinning-the-victim-dentry-in-vfs_rmdir-vfs_rename_dir.patch @@ -27,7 +27,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- a/fs/namei.c +++ b/fs/namei.c -@@ -2580,6 +2580,7 @@ int vfs_rmdir(struct inode *dir, struct +@@ -2582,6 +2582,7 @@ int vfs_rmdir(struct inode *dir, struct if (!dir->i_op->rmdir) return -EPERM; @@ -35,7 +35,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> mutex_lock(&dentry->d_inode->i_mutex); error = -EBUSY; -@@ -2600,6 +2601,7 @@ int vfs_rmdir(struct inode *dir, struct +@@ -2602,6 +2603,7 @@ int vfs_rmdir(struct inode *dir, struct out: mutex_unlock(&dentry->d_inode->i_mutex); @@ -43,7 +43,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (!error) d_delete(dentry); return error; -@@ -3003,6 +3005,7 @@ static int vfs_rename_dir(struct inode * +@@ -3005,6 +3007,7 @@ static int vfs_rename_dir(struct inode * if (error) return error; @@ -51,7 +51,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (target) mutex_lock(&target->i_mutex); -@@ -3023,6 +3026,7 @@ static int vfs_rename_dir(struct inode * +@@ -3025,6 +3028,7 @@ static int vfs_rename_dir(struct inode * out: if (target) mutex_unlock(&target->i_mutex); diff --git a/queue-3.0/series b/queue-3.0/series index c6e04e259b..f34af1f02a 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -100,7 +100,6 @@ pci-set-pci-e-max-payload-size-on-fabric.patch pci-export-pcie_bus_configure_settings-symbol.patch pci-remove-mrrs-modification-from-mps-setting-code.patch isci-fix-sata-response-handling.patch -vfs-automount-should-ignore-lookup_follow.patch isci-fix-32-bit-operation-when-config_highmem64g-n.patch asoc-mpc5200-replace-of_device-with-platform_device.patch hpsa-fix-problem-that-obdr-devices-are-not-detected.patch @@ -222,3 +221,4 @@ hwmon-ds620-fix-handling-of-negative-temperatures.patch arm-dma-mapping-free-allocated-page-if-unable-to-map.patch arm-7091-1-errata-d-cache-line-maintenance-operation-by.patch arm-7099-1-futex-preserve-oldval-in-smp-__futex_atomic_op.patch +firmware-loader-allow-builtin-firmware-load-even-if.patch diff --git a/queue-3.0/vfs-automount-should-ignore-lookup_follow.patch b/queue-3.0/vfs-automount-should-ignore-lookup_follow.patch deleted file mode 100644 index 87851385a5..0000000000 --- a/queue-3.0/vfs-automount-should-ignore-lookup_follow.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 0ec26fd0698285b31248e34bf1abb022c00f23d6 Mon Sep 17 00:00:00 2001 -From: Miklos Szeredi <mszeredi@suse.cz> -Date: Mon, 5 Sep 2011 18:06:26 +0200 -Subject: vfs: automount should ignore LOOKUP_FOLLOW - -From: Miklos Szeredi <mszeredi@suse.cz> - -commit 0ec26fd0698285b31248e34bf1abb022c00f23d6 upstream. - -Prior to 2.6.38 automount would not trigger on either stat(2) or -lstat(2) on the automount point. - -After 2.6.38, with the introduction of the ->d_automount() -infrastructure, stat(2) and others would start triggering automount -while lstat(2), etc. still would not. This is a regression and a -userspace ABI change. - -Problem originally reported here: - - http://thread.gmane.org/gmane.linux.kernel.autofs/6098 - -It appears that there was an attempt at fixing various userspace tools -to not trigger the automount. But since the stat system call is -rather common it is impossible to "fix" all userspace. - -This patch reverts the original behavior, which is to not trigger on -stat(2) and other symlink following syscalls. - -[ It's not really clear what the right behavior is. Apparently Solaris - does the "automount on stat, leave alone on lstat". And some programs - can get unhappy when "stat+open+fstat" ends up giving a different - result from the fstat than from the initial stat. - - But the change in 2.6.38 resulted in problems for some people, so - we're going back to old behavior. Maybe we can re-visit this - discussion at some future date - Linus ] - -Reported-by: Leonardo Chiquitto <leonardo.lists@gmail.com> -Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> -Acked-by: Ian Kent <raven@themaw.net> -Cc: David Howells <dhowells@redhat.com> -Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - fs/namei.c | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - ---- a/fs/namei.c -+++ b/fs/namei.c -@@ -783,12 +783,10 @@ static int follow_automount(struct path - * type under the mountpoint, wants to traverse through the mountpoint - * or wants to open the mounted directory. - * -- * We don't want to mount if someone's just doing a stat and they've -- * set AT_SYMLINK_NOFOLLOW - unless they're stat'ing a directory and -- * appended a '/' to the name. -+ * We don't want to mount if someone's just doing a stat - unless -+ * they're stat'ing a directory and appended a '/' to the name. - */ -- if (!(flags & LOOKUP_FOLLOW) && -- !(flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY | -+ if (!(flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY | - LOOKUP_OPEN | LOOKUP_CREATE))) - return -EISDIR; - |