]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 8 Aug 2011 23:41:51 +0000 (16:41 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 8 Aug 2011 23:41:51 +0000 (16:41 -0700)
queue-3.0/asus-wmi-fix-hwmon-pwm1.patch [new file with mode: 0644]
queue-3.0/asus-wmi-return-proper-value-in-store_cpufv.patch [new file with mode: 0644]
queue-3.0/cifs-convert-prefixpath-delimiters-in.patch [new file with mode: 0644]
queue-3.0/cifs-cope-with-negative-dentries-in-cifs_get_root.patch [new file with mode: 0644]
queue-3.0/cifs-fix-missing-a-decrement-of-inflight-value.patch [new file with mode: 0644]
queue-3.0/series

diff --git a/queue-3.0/asus-wmi-fix-hwmon-pwm1.patch b/queue-3.0/asus-wmi-fix-hwmon-pwm1.patch
new file mode 100644 (file)
index 0000000..aed2d5e
--- /dev/null
@@ -0,0 +1,60 @@
+From 49979d091d1847823c064301da1ec173619ddd92 Mon Sep 17 00:00:00 2001
+From: Corentin Chary <corentin.chary@gmail.com>
+Date: Fri, 1 Jul 2011 11:34:26 +0200
+Subject: asus-wmi: fix hwmon/pwm1
+
+From: Corentin Chary <corentin.chary@gmail.com>
+
+commit 49979d091d1847823c064301da1ec173619ddd92 upstream.
+
+The code was completly broken, and should never had been sent
+to the kernel. That's what happens when you write code without
+hardware to test it.
+
+Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
+Signed-off-by: Matthew Garrett <mjg@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/platform/x86/asus-wmi.c |    9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+--- a/drivers/platform/x86/asus-wmi.c
++++ b/drivers/platform/x86/asus-wmi.c
+@@ -797,8 +797,8 @@ exit:
+  * Hwmon device
+  */
+ static ssize_t asus_hwmon_pwm1(struct device *dev,
+-                          struct device_attribute *attr,
+-                          char *buf)
++                             struct device_attribute *attr,
++                             char *buf)
+ {
+       struct asus_wmi *asus = dev_get_drvdata(dev);
+       u32 value;
+@@ -809,7 +809,7 @@ static ssize_t asus_hwmon_pwm1(struct de
+       if (err < 0)
+               return err;
+-      value |= 0xFF;
++      value &= 0xFF;
+       if (value == 1) /* Low Speed */
+               value = 85;
+@@ -869,7 +869,7 @@ static mode_t asus_hwmon_sysfs_is_visibl
+                * - reverved bits are non-zero
+                * - sfun and presence bit are not set
+                */
+-              if (value != ASUS_WMI_UNSUPPORTED_METHOD || value & 0xFFF80000
++              if (value == ASUS_WMI_UNSUPPORTED_METHOD || value & 0xFFF80000
+                   || (!asus->sfun && !(value & ASUS_WMI_DSTS_PRESENCE_BIT)))
+                       ok = false;
+       }
+@@ -904,6 +904,7 @@ static int asus_wmi_hwmon_init(struct as
+               pr_err("Could not register asus hwmon device\n");
+               return PTR_ERR(hwmon);
+       }
++      dev_set_drvdata(hwmon, asus);
+       asus->hwmon_device = hwmon;
+       result = sysfs_create_group(&hwmon->kobj, &hwmon_attribute_group);
+       if (result)
diff --git a/queue-3.0/asus-wmi-return-proper-value-in-store_cpufv.patch b/queue-3.0/asus-wmi-return-proper-value-in-store_cpufv.patch
new file mode 100644 (file)
index 0000000..0d43b08
--- /dev/null
@@ -0,0 +1,40 @@
+From 3df5fdadf6400373a696bb14e27d4771e5f6afb3 Mon Sep 17 00:00:00 2001
+From: Corentin Chary <corentin.chary@gmail.com>
+Date: Fri, 1 Jul 2011 11:34:38 +0200
+Subject: asus-wmi: return proper value in store_cpufv()
+
+From: Corentin Chary <corentin.chary@gmail.com>
+
+commit 3df5fdadf6400373a696bb14e27d4771e5f6afb3 upstream.
+
+Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
+Signed-off-by: Matthew Garrett <mjg@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/platform/x86/asus-wmi.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/platform/x86/asus-wmi.c
++++ b/drivers/platform/x86/asus-wmi.c
+@@ -1165,14 +1165,18 @@ ASUS_WMI_CREATE_DEVICE_ATTR(cardr, 0644,
+ static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr,
+                          const char *buf, size_t count)
+ {
+-      int value;
++      int value, rv;
+       if (!count || sscanf(buf, "%i", &value) != 1)
+               return -EINVAL;
+       if (value < 0 || value > 2)
+               return -EINVAL;
+-      return asus_wmi_evaluate_method(ASUS_WMI_METHODID_CFVS, value, 0, NULL);
++      rv = asus_wmi_evaluate_method(ASUS_WMI_METHODID_CFVS, value, 0, NULL);
++      if (rv < 0)
++              return rv;
++
++      return count;
+ }
+ static DEVICE_ATTR(cpufv, S_IRUGO | S_IWUSR, NULL, store_cpufv);
diff --git a/queue-3.0/cifs-convert-prefixpath-delimiters-in.patch b/queue-3.0/cifs-convert-prefixpath-delimiters-in.patch
new file mode 100644 (file)
index 0000000..0e7d7c2
--- /dev/null
@@ -0,0 +1,53 @@
+From f9e8c45002cacad536b338dfa9e910e341a49c31 Mon Sep 17 00:00:00 2001
+From: Jeff Layton <jlayton@redhat.com>
+Date: Fri, 5 Aug 2011 10:28:01 -0400
+Subject: cifs: convert prefixpath delimiters in
+ cifs_build_path_to_root
+
+From: Jeff Layton <jlayton@redhat.com>
+
+commit f9e8c45002cacad536b338dfa9e910e341a49c31 upstream.
+
+Regression from 2.6.39...
+
+The delimiters in the prefixpath are not being converted based on
+whether posix paths are in effect. Fixes:
+
+    https://bugzilla.redhat.com/show_bug.cgi?id=727834
+
+Reported-and-Tested-by: Iain Arnell <iarnell@gmail.com>
+Reported-by: Patrick Oltmann <patrick.oltmann@gmx.net>
+Cc: Pavel Shilovsky <piastryyy@gmail.com>
+Signed-off-by: Jeff Layton <jlayton@redhat.com>
+Signed-off-by: Steve French <sfrench@us.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/cifs/inode.c |   14 ++------------
+ 1 file changed, 2 insertions(+), 12 deletions(-)
+
+--- a/fs/cifs/inode.c
++++ b/fs/cifs/inode.c
+@@ -764,20 +764,10 @@ char *cifs_build_path_to_root(struct smb
+       if (full_path == NULL)
+               return full_path;
+-      if (dfsplen) {
++      if (dfsplen)
+               strncpy(full_path, tcon->treeName, dfsplen);
+-              /* switch slash direction in prepath depending on whether
+-               * windows or posix style path names
+-               */
+-              if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) {
+-                      int i;
+-                      for (i = 0; i < dfsplen; i++) {
+-                              if (full_path[i] == '\\')
+-                                      full_path[i] = '/';
+-                      }
+-              }
+-      }
+       strncpy(full_path + dfsplen, vol->prepath, pplen);
++      convert_delimiter(full_path, CIFS_DIR_SEP(cifs_sb));
+       full_path[dfsplen + pplen] = 0; /* add trailing null */
+       return full_path;
+ }
diff --git a/queue-3.0/cifs-cope-with-negative-dentries-in-cifs_get_root.patch b/queue-3.0/cifs-cope-with-negative-dentries-in-cifs_get_root.patch
new file mode 100644 (file)
index 0000000..010b054
--- /dev/null
@@ -0,0 +1,42 @@
+From 80975d21aae2136ccae1ce914a1602dc1d8b0795 Mon Sep 17 00:00:00 2001
+From: Jeff Layton <jlayton@redhat.com>
+Date: Fri, 5 Aug 2011 09:02:40 -0400
+Subject: cifs: cope with negative dentries in cifs_get_root
+
+From: Jeff Layton <jlayton@redhat.com>
+
+commit 80975d21aae2136ccae1ce914a1602dc1d8b0795 upstream.
+
+The loop around lookup_one_len doesn't handle the case where it might
+return a negative dentry, which can cause an oops on the next pass
+through the loop. Check for that and break out of the loop with an
+error of -ENOENT if there is one.
+
+Fixes the panic reported here:
+
+    https://bugzilla.redhat.com/show_bug.cgi?id=727927
+
+Reported-by: TR Bentley <home@trarbentley.net>
+Reported-by: Iain Arnell <iarnell@gmail.com>
+Cc: Al Viro <viro@ZenIV.linux.org.uk>
+Signed-off-by: Jeff Layton <jlayton@redhat.com>
+Signed-off-by: Steve French <sfrench@us.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/cifs/cifsfs.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/fs/cifs/cifsfs.c
++++ b/fs/cifs/cifsfs.c
+@@ -581,6 +581,10 @@ cifs_get_root(struct smb_vol *vol, struc
+               mutex_unlock(&dir->i_mutex);
+               dput(dentry);
+               dentry = child;
++              if (!dentry->d_inode) {
++                      dput(dentry);
++                      dentry = ERR_PTR(-ENOENT);
++              }
+       } while (!IS_ERR(dentry));
+       _FreeXid(xid);
+       kfree(full_path);
diff --git a/queue-3.0/cifs-fix-missing-a-decrement-of-inflight-value.patch b/queue-3.0/cifs-fix-missing-a-decrement-of-inflight-value.patch
new file mode 100644 (file)
index 0000000..5a1b32a
--- /dev/null
@@ -0,0 +1,30 @@
+From 0193e072268fe62c4b19ad4b05cd0d4b23c43bb9 Mon Sep 17 00:00:00 2001
+From: Pavel Shilovsky <piastryyy@gmail.com>
+Date: Wed, 3 Aug 2011 23:12:18 +0400
+Subject: CIFS: Fix missing a decrement of inFlight value
+
+From: Pavel Shilovsky <piastryyy@gmail.com>
+
+commit 0193e072268fe62c4b19ad4b05cd0d4b23c43bb9 upstream.
+
+if we failed on getting mid entry in cifs_call_async.
+
+Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com>
+Signed-off-by: Steve French <sfrench@us.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/cifs/transport.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/fs/cifs/transport.c
++++ b/fs/cifs/transport.c
+@@ -362,6 +362,8 @@ cifs_call_async(struct TCP_Server_Info *
+       mid = AllocMidQEntry(hdr, server);
+       if (mid == NULL) {
+               mutex_unlock(&server->srv_mutex);
++              atomic_dec(&server->inFlight);
++              wake_up(&server->request_q);
+               return -ENOMEM;
+       }
index 9ab5c23531112900be6ca0b89dd349dcc8c5381a..db17ca545a9713ba9da67fcb9a899209af652685 100644 (file)
@@ -28,3 +28,8 @@ drm-i915-hold-mode_config-mutex-during-hotplug-processing.patch
 drm-i915-fixup-for-hold-mode_config-mutex-during-hotplug.patch
 0001-crypto-Move-md5_transform-to-lib-md5.c.patch
 0002-net-Compute-protocol-sequence-numbers-and-fragment-I.patch
+asus-wmi-fix-hwmon-pwm1.patch
+asus-wmi-return-proper-value-in-store_cpufv.patch
+cifs-fix-missing-a-decrement-of-inflight-value.patch
+cifs-cope-with-negative-dentries-in-cifs_get_root.patch
+cifs-convert-prefixpath-delimiters-in.patch