]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Nov 2013 23:21:14 +0000 (15:21 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Nov 2013 23:21:14 +0000 (15:21 -0800)
added patches:
configfs-fix-race-between-dentry-put-and-lookup.patch
cris-media-platform-drivers-fix-build.patch
dmi-add-support-for-exact-dmi-matches-in-addition-to-substring-matching.patch
drm-i915-no-lvds-hardware-on-intel-d410pt-and-d425kt.patch
drm-i915-quirk-away-phantom-lvds-on-intel-s-d510mo-mainboard.patch
s390-vtime-correct-idle-time-calculation.patch

queue-3.10/configfs-fix-race-between-dentry-put-and-lookup.patch [new file with mode: 0644]
queue-3.10/cris-media-platform-drivers-fix-build.patch [new file with mode: 0644]
queue-3.10/dmi-add-support-for-exact-dmi-matches-in-addition-to-substring-matching.patch [new file with mode: 0644]
queue-3.10/drm-i915-no-lvds-hardware-on-intel-d410pt-and-d425kt.patch [new file with mode: 0644]
queue-3.10/drm-i915-quirk-away-phantom-lvds-on-intel-s-d510mo-mainboard.patch [new file with mode: 0644]
queue-3.10/s390-vtime-correct-idle-time-calculation.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/configfs-fix-race-between-dentry-put-and-lookup.patch b/queue-3.10/configfs-fix-race-between-dentry-put-and-lookup.patch
new file mode 100644 (file)
index 0000000..c869f8e
--- /dev/null
@@ -0,0 +1,94 @@
+From 76ae281f6307331aa063288edb6422ae99f435f0 Mon Sep 17 00:00:00 2001
+From: Junxiao Bi <junxiao.bi@oracle.com>
+Date: Thu, 21 Nov 2013 14:31:56 -0800
+Subject: configfs: fix race between dentry put and lookup
+
+From: Junxiao Bi <junxiao.bi@oracle.com>
+
+commit 76ae281f6307331aa063288edb6422ae99f435f0 upstream.
+
+A race window in configfs, it starts from one dentry is UNHASHED and end
+before configfs_d_iput is called.  In this window, if a lookup happen,
+since the original dentry was UNHASHED, so a new dentry will be
+allocated, and then in configfs_attach_attr(), sd->s_dentry will be
+updated to the new dentry.  Then in configfs_d_iput(),
+BUG_ON(sd->s_dentry != dentry) will be triggered and system panic.
+
+sys_open:                     sys_close:
+ ...                           fput
+                                dput
+                                 dentry_kill
+                                  __d_drop <--- dentry unhashed here,
+                                           but sd->dentry still point
+                                           to this dentry.
+
+ lookup_real
+  configfs_lookup
+   configfs_attach_attr---> update sd->s_dentry
+                            to new allocated dentry here.
+
+                                   d_kill
+                                     configfs_d_iput <--- BUG_ON(sd->s_dentry != dentry)
+                                                     triggered here.
+
+To fix it, change configfs_d_iput to not update sd->s_dentry if
+sd->s_count > 2, that means there are another dentry is using the sd
+beside the one that is going to be put.  Use configfs_dirent_lock in
+configfs_attach_attr to sync with configfs_d_iput.
+
+With the following steps, you can reproduce the bug.
+
+1. enable ocfs2, this will mount configfs at /sys/kernel/config and
+   fill configure in it.
+
+2. run the following script.
+       while [ 1 ]; do cat /sys/kernel/config/cluster/$your_cluster_name/idle_timeout_ms > /dev/null; done &
+       while [ 1 ]; do cat /sys/kernel/config/cluster/$your_cluster_name/idle_timeout_ms > /dev/null; done &
+
+Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
+Cc: Joel Becker <jlbec@evilplan.org>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/configfs/dir.c |   16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+--- a/fs/configfs/dir.c
++++ b/fs/configfs/dir.c
+@@ -56,10 +56,19 @@ static void configfs_d_iput(struct dentr
+       struct configfs_dirent *sd = dentry->d_fsdata;
+       if (sd) {
+-              BUG_ON(sd->s_dentry != dentry);
+               /* Coordinate with configfs_readdir */
+               spin_lock(&configfs_dirent_lock);
+-              sd->s_dentry = NULL;
++              /* Coordinate with configfs_attach_attr where will increase
++               * sd->s_count and update sd->s_dentry to new allocated one.
++               * Only set sd->dentry to null when this dentry is the only
++               * sd owner.
++               * If not do so, configfs_d_iput may run just after
++               * configfs_attach_attr and set sd->s_dentry to null
++               * even it's still in use.
++               */
++              if (atomic_read(&sd->s_count) <= 2)
++                      sd->s_dentry = NULL;
++
+               spin_unlock(&configfs_dirent_lock);
+               configfs_put(sd);
+       }
+@@ -426,8 +435,11 @@ static int configfs_attach_attr(struct c
+       struct configfs_attribute * attr = sd->s_element;
+       int error;
++      spin_lock(&configfs_dirent_lock);
+       dentry->d_fsdata = configfs_get(sd);
+       sd->s_dentry = dentry;
++      spin_unlock(&configfs_dirent_lock);
++
+       error = configfs_create(dentry, (attr->ca_mode & S_IALLUGO) | S_IFREG,
+                               configfs_init_file);
+       if (error) {
diff --git a/queue-3.10/cris-media-platform-drivers-fix-build.patch b/queue-3.10/cris-media-platform-drivers-fix-build.patch
new file mode 100644 (file)
index 0000000..adf8150
--- /dev/null
@@ -0,0 +1,56 @@
+From 72a0c5571351f5184195754d23db3e14495b2080 Mon Sep 17 00:00:00 2001
+From: Mauro Carvalho Chehab <m.chehab@samsung.com>
+Date: Tue, 12 Nov 2013 15:06:49 -0800
+Subject: cris: media platform drivers: fix build
+
+From: Mauro Carvalho Chehab <m.chehab@samsung.com>
+
+commit 72a0c5571351f5184195754d23db3e14495b2080 upstream.
+
+On cris arch, the functions below aren't defined:
+
+  drivers/media/platform/sh_veu.c: In function 'sh_veu_reg_read':
+
+  drivers/media/platform/sh_veu.c:228:2: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration]
+  drivers/media/platform/sh_veu.c: In function 'sh_veu_reg_write':
+
+  drivers/media/platform/sh_veu.c:234:2: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration]
+  drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_read':
+  drivers/media/platform/vsp1/vsp1.h:66:2: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration]
+  drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_write':
+  drivers/media/platform/vsp1/vsp1.h:71:2: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration]
+  drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_read':
+  drivers/media/platform/vsp1/vsp1.h:66:2: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration]
+  drivers/media/platform/vsp1/vsp1.h: In function 'vsp1_write':
+  drivers/media/platform/vsp1/vsp1.h:71:2: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration]
+  drivers/media/platform/soc_camera/rcar_vin.c: In function 'rcar_vin_setup':
+  drivers/media/platform/soc_camera/rcar_vin.c:284:3: error: implicit declaration of function 'iowrite32' [-Werror=implicit-function-declaration]
+
+  drivers/media/platform/soc_camera/rcar_vin.c: In function 'rcar_vin_request_capture_stop':
+  drivers/media/platform/soc_camera/rcar_vin.c:353:2: error: implicit declaration of function 'ioread32' [-Werror=implicit-function-declaration]
+
+Yet, they're available, as CONFIG_GENERIC_IOMAP is defined.  What happens
+is that asm/io.h was not including asm-generic/iomap.h.
+
+Suggested-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
+Cc: Mikael Starvik <starvik@axis.com>
+Cc: Jesper Nilsson <jesper.nilsson@axis.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/cris/include/asm/io.h |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/cris/include/asm/io.h
++++ b/arch/cris/include/asm/io.h
+@@ -3,6 +3,7 @@
+ #include <asm/page.h>   /* for __va, __pa */
+ #include <arch/io.h>
++#include <asm-generic/iomap.h>
+ #include <linux/kernel.h>
+ struct cris_io_operations
diff --git a/queue-3.10/dmi-add-support-for-exact-dmi-matches-in-addition-to-substring-matching.patch b/queue-3.10/dmi-add-support-for-exact-dmi-matches-in-addition-to-substring-matching.patch
new file mode 100644 (file)
index 0000000..e4f4db4
--- /dev/null
@@ -0,0 +1,82 @@
+From 5017b2851373ee15c7035151853bb1448800cae2 Mon Sep 17 00:00:00 2001
+From: Jani Nikula <jani.nikula@intel.com>
+Date: Wed, 3 Jul 2013 15:05:02 -0700
+Subject: dmi: add support for exact DMI matches in addition to substring matching
+
+From: Jani Nikula <jani.nikula@intel.com>
+
+commit 5017b2851373ee15c7035151853bb1448800cae2 upstream.
+
+dmi_match() considers a substring match to be a successful match.  This is
+not always sufficient to distinguish between DMI data for different
+systems.  Add support for exact string matching using strcmp() in addition
+to the substring matching using strstr().
+
+The specific use case in the i915 driver is to allow us to use an exact
+match for D510MO, without also incorrectly matching D510MOV:
+
+  {
+       .ident = "Intel D510MO",
+       .matches = {
+               DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
+               DMI_EXACT_MATCH(DMI_BOARD_NAME, "D510MO"),
+       },
+  }
+
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Cc: <annndddrr@gmail.com>
+Cc: Chris Wilson <chris@chris-wilson.co.uk>
+Cc: Cornel Panceac <cpanceac@gmail.com>
+Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/firmware/dmi_scan.c     |   12 +++++++++---
+ include/linux/mod_devicetable.h |    6 ++++--
+ 2 files changed, 13 insertions(+), 5 deletions(-)
+
+--- a/drivers/firmware/dmi_scan.c
++++ b/drivers/firmware/dmi_scan.c
+@@ -551,9 +551,15 @@ static bool dmi_matches(const struct dmi
+               int s = dmi->matches[i].slot;
+               if (s == DMI_NONE)
+                       break;
+-              if (dmi_ident[s]
+-                  && strstr(dmi_ident[s], dmi->matches[i].substr))
+-                      continue;
++              if (dmi_ident[s]) {
++                      if (!dmi->matches[i].exact_match &&
++                          strstr(dmi_ident[s], dmi->matches[i].substr))
++                              continue;
++                      else if (dmi->matches[i].exact_match &&
++                               !strcmp(dmi_ident[s], dmi->matches[i].substr))
++                              continue;
++              }
++
+               /* No match */
+               return false;
+       }
+--- a/include/linux/mod_devicetable.h
++++ b/include/linux/mod_devicetable.h
+@@ -456,7 +456,8 @@ enum dmi_field {
+ };
+ struct dmi_strmatch {
+-      unsigned char slot;
++      unsigned char slot:7;
++      unsigned char exact_match:1;
+       char substr[79];
+ };
+@@ -474,7 +475,8 @@ struct dmi_system_id {
+  */
+ #define dmi_device_id dmi_system_id
+-#define DMI_MATCH(a, b)       { a, b }
++#define DMI_MATCH(a, b)       { .slot = a, .substr = b }
++#define DMI_EXACT_MATCH(a, b) { .slot = a, .substr = b, .exact_match = 1 }
+ #define PLATFORM_NAME_SIZE    20
+ #define PLATFORM_MODULE_PREFIX        "platform:"
diff --git a/queue-3.10/drm-i915-no-lvds-hardware-on-intel-d410pt-and-d425kt.patch b/queue-3.10/drm-i915-no-lvds-hardware-on-intel-d410pt-and-d425kt.patch
new file mode 100644 (file)
index 0000000..ded1619
--- /dev/null
@@ -0,0 +1,51 @@
+From 645378d85ee524e429aa4cf52806047b56cdc596 Mon Sep 17 00:00:00 2001
+From: Rob Pearce <rob@flitspace.org.uk>
+Date: Sun, 27 Oct 2013 16:13:42 +0000
+Subject: drm/i915: No LVDS hardware on Intel D410PT and D425KT
+
+From: Rob Pearce <rob@flitspace.org.uk>
+
+commit 645378d85ee524e429aa4cf52806047b56cdc596 upstream.
+
+The Intel D410PT(LW) and D425KT Mini-ITX desktop boards both show up as
+having LVDS but the hardware is not populated. This patch adds them to
+the list of such systems. Patch is against 3.11.4
+
+v2: Patch revised to match the D425KT exactly as the D425KTW does have
+LVDS.  According to Intel's documentation, the D410PTL and D410PLTW
+don't.
+
+Signed-off-by: Rob Pearce <rob@flitspace.org.uk>
+[danvet: Pimp commit message to my liking and add cc: stable.]
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_lvds.c |   16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+--- a/drivers/gpu/drm/i915/intel_lvds.c
++++ b/drivers/gpu/drm/i915/intel_lvds.c
+@@ -871,6 +871,22 @@ static const struct dmi_system_id intel_
+       },
+       {
+               .callback = intel_no_lvds_dmi_callback,
++              .ident = "Intel D410PT",
++              .matches = {
++                      DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
++                      DMI_MATCH(DMI_BOARD_NAME, "D410PT"),
++              },
++      },
++      {
++              .callback = intel_no_lvds_dmi_callback,
++              .ident = "Intel D425KT",
++              .matches = {
++                      DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
++                      DMI_EXACT_MATCH(DMI_BOARD_NAME, "D425KT"),
++              },
++      },
++      {
++              .callback = intel_no_lvds_dmi_callback,
+               .ident = "Intel D510MO",
+               .matches = {
+                       DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
diff --git a/queue-3.10/drm-i915-quirk-away-phantom-lvds-on-intel-s-d510mo-mainboard.patch b/queue-3.10/drm-i915-quirk-away-phantom-lvds-on-intel-s-d510mo-mainboard.patch
new file mode 100644 (file)
index 0000000..f598fb2
--- /dev/null
@@ -0,0 +1,45 @@
+From e5614f0c2d0f4d7f0b8ef745d34593baf2c5dbf8 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Wed, 3 Jul 2013 15:05:03 -0700
+Subject: drm/i915: quirk away phantom LVDS on Intel's D510MO mainboard
+
+From: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit e5614f0c2d0f4d7f0b8ef745d34593baf2c5dbf8 upstream.
+
+This replaceable mainboard only has a VGA-out, yet it claims to also have
+a connected LVDS header.
+
+Addresses https://bugs.freedesktop.org/show_bug.cgi?id=63860
+
+[jani.nikula@intel.com: use DMI_EXACT_MATCH for board name.]
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Reported-by: <annndddrr@gmail.com>
+Cc: Cornel Panceac <cpanceac@gmail.com>
+Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_lvds.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/gpu/drm/i915/intel_lvds.c
++++ b/drivers/gpu/drm/i915/intel_lvds.c
+@@ -869,6 +869,14 @@ static const struct dmi_system_id intel_
+                       DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Q900"),
+               },
+       },
++      {
++              .callback = intel_no_lvds_dmi_callback,
++              .ident = "Intel D510MO",
++              .matches = {
++                      DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
++                      DMI_EXACT_MATCH(DMI_BOARD_NAME, "D510MO"),
++              },
++      },
+       { }     /* terminating entry */
+ };
diff --git a/queue-3.10/s390-vtime-correct-idle-time-calculation.patch b/queue-3.10/s390-vtime-correct-idle-time-calculation.patch
new file mode 100644 (file)
index 0000000..f072208
--- /dev/null
@@ -0,0 +1,53 @@
+From 4560e7c3317c7a2b370e36dadd3a3bac2ed70818 Mon Sep 17 00:00:00 2001
+From: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Date: Mon, 28 Oct 2013 12:15:32 +0100
+Subject: s390/vtime: correct idle time calculation
+
+From: Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+commit 4560e7c3317c7a2b370e36dadd3a3bac2ed70818 upstream.
+
+Use the ACCESS_ONCE macro for both accesses to idle->sequence in the
+loops to calculate the idle time. If only one access uses the macro,
+the compiler is free to cache the value for the second access which
+can cause endless loops.
+
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/s390/kernel/smp.c   |    4 ++--
+ arch/s390/kernel/vtime.c |    2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+--- a/arch/s390/kernel/smp.c
++++ b/arch/s390/kernel/smp.c
+@@ -933,7 +933,7 @@ static ssize_t show_idle_count(struct de
+               idle_count = ACCESS_ONCE(idle->idle_count);
+               if (ACCESS_ONCE(idle->clock_idle_enter))
+                       idle_count++;
+-      } while ((sequence & 1) || (idle->sequence != sequence));
++      } while ((sequence & 1) || (ACCESS_ONCE(idle->sequence) != sequence));
+       return sprintf(buf, "%llu\n", idle_count);
+ }
+ static DEVICE_ATTR(idle_count, 0444, show_idle_count, NULL);
+@@ -951,7 +951,7 @@ static ssize_t show_idle_time(struct dev
+               idle_time = ACCESS_ONCE(idle->idle_time);
+               idle_enter = ACCESS_ONCE(idle->clock_idle_enter);
+               idle_exit = ACCESS_ONCE(idle->clock_idle_exit);
+-      } while ((sequence & 1) || (idle->sequence != sequence));
++      } while ((sequence & 1) || (ACCESS_ONCE(idle->sequence) != sequence));
+       idle_time += idle_enter ? ((idle_exit ? : now) - idle_enter) : 0;
+       return sprintf(buf, "%llu\n", idle_time >> 12);
+ }
+--- a/arch/s390/kernel/vtime.c
++++ b/arch/s390/kernel/vtime.c
+@@ -190,7 +190,7 @@ cputime64_t s390_get_idle_time(int cpu)
+               sequence = ACCESS_ONCE(idle->sequence);
+               idle_enter = ACCESS_ONCE(idle->clock_idle_enter);
+               idle_exit = ACCESS_ONCE(idle->clock_idle_exit);
+-      } while ((sequence & 1) || (idle->sequence != sequence));
++      } while ((sequence & 1) || (ACCESS_ONCE(idle->sequence) != sequence));
+       return idle_enter ? ((idle_exit ?: now) - idle_enter) : 0;
+ }
index 7ffef4eb8499497c86e0f0c5a076b1fb9afe143b..84c48d9ca4adec1a5247b73102f8ab126e44a2e0 100644 (file)
@@ -72,3 +72,9 @@ sunrpc-fix-a-data-corruption-issue-when-retransmitting-rpc-calls.patch
 mei-nfc-fix-memory-leak-in-error-path.patch
 usb-hub-clear-port-reset-change-during-init-resume.patch
 rt2800usb-slow-down-tx-status-polling.patch
+s390-vtime-correct-idle-time-calculation.patch
+configfs-fix-race-between-dentry-put-and-lookup.patch
+cris-media-platform-drivers-fix-build.patch
+dmi-add-support-for-exact-dmi-matches-in-addition-to-substring-matching.patch
+drm-i915-quirk-away-phantom-lvds-on-intel-s-d510mo-mainboard.patch
+drm-i915-no-lvds-hardware-on-intel-d410pt-and-d425kt.patch