]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Nov 2014 00:20:17 +0000 (09:20 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Nov 2014 00:20:17 +0000 (09:20 +0900)
added patches:
acer-wmi-add-acpi_backlight-video-quirk-for-the-acer-kav80.patch
drm-radeon-dpm-disable-ulv-support-on-si.patch
drm-radeon-remove-invalid-pci-id.patch
drm-vmwgfx-filter-out-modes-those-cannot-be-supported-by-the-current-vram-size.patch
i2c-at91-don-t-account-as-iowait.patch
pinctrl-baytrail-show-output-gpio-state-correctly-on-intel-baytrail.patch
powerpc-use-device_online-offline-instead-of-cpu_up-down.patch
rbd-fix-error-recovery-in-rbd_obj_read_sync.patch
regulator-max77693-fix-use-of-uninitialized-regulator-config.patch
sysfs-driver-core-fix-glue-dir-race-condition-by-gdp_mutex.patch

queue-3.14/acer-wmi-add-acpi_backlight-video-quirk-for-the-acer-kav80.patch [new file with mode: 0644]
queue-3.14/drm-radeon-dpm-disable-ulv-support-on-si.patch [new file with mode: 0644]
queue-3.14/drm-radeon-remove-invalid-pci-id.patch [new file with mode: 0644]
queue-3.14/drm-vmwgfx-filter-out-modes-those-cannot-be-supported-by-the-current-vram-size.patch [new file with mode: 0644]
queue-3.14/i2c-at91-don-t-account-as-iowait.patch [new file with mode: 0644]
queue-3.14/pinctrl-baytrail-show-output-gpio-state-correctly-on-intel-baytrail.patch [new file with mode: 0644]
queue-3.14/powerpc-use-device_online-offline-instead-of-cpu_up-down.patch [new file with mode: 0644]
queue-3.14/rbd-fix-error-recovery-in-rbd_obj_read_sync.patch [new file with mode: 0644]
queue-3.14/regulator-max77693-fix-use-of-uninitialized-regulator-config.patch [new file with mode: 0644]
queue-3.14/series
queue-3.14/sysfs-driver-core-fix-glue-dir-race-condition-by-gdp_mutex.patch [new file with mode: 0644]

diff --git a/queue-3.14/acer-wmi-add-acpi_backlight-video-quirk-for-the-acer-kav80.patch b/queue-3.14/acer-wmi-add-acpi_backlight-video-quirk-for-the-acer-kav80.patch
new file mode 100644 (file)
index 0000000..adb3232
--- /dev/null
@@ -0,0 +1,47 @@
+From 183fd8fcd7f8afb7ac5ec68f83194872f9fecc84 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Wed, 22 Oct 2014 16:06:38 +0200
+Subject: acer-wmi: Add acpi_backlight=video quirk for the Acer KAV80
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit 183fd8fcd7f8afb7ac5ec68f83194872f9fecc84 upstream.
+
+The acpi-video backlight interface on the Acer KAV80 is broken, and worse
+it causes the entire machine to slow down significantly after a suspend/resume.
+
+Blacklist it, and use the acer-wmi backlight interface instead. Note that
+the KAV80 is somewhat unique in that it is the only Acer model where we
+fall back to acer-wmi after blacklisting, rather then using the native
+(e.g. intel) backlight driver. This is done because there is no native
+backlight interface on this model.
+
+BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1128309
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Darren Hart <dvhart@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/platform/x86/acer-wmi.c |   11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/drivers/platform/x86/acer-wmi.c
++++ b/drivers/platform/x86/acer-wmi.c
+@@ -570,6 +570,17 @@ static const struct dmi_system_id video_
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5750"),
+               },
+       },
++      {
++              /*
++               * Note no video_set_backlight_video_vendor, we must use the
++               * acer interface, as there is no native backlight interface.
++               */
++              .ident = "Acer KAV80",
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "KAV80"),
++              },
++      },
+       {}
+ };
diff --git a/queue-3.14/drm-radeon-dpm-disable-ulv-support-on-si.patch b/queue-3.14/drm-radeon-dpm-disable-ulv-support-on-si.patch
new file mode 100644 (file)
index 0000000..fbb04c0
--- /dev/null
@@ -0,0 +1,32 @@
+From 6fa455935ab956248b165f150ec6ae9106210077 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Mon, 13 Oct 2014 12:44:49 -0400
+Subject: drm/radeon/dpm: disable ulv support on SI
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 6fa455935ab956248b165f150ec6ae9106210077 upstream.
+
+Causes problems on some boards.
+
+bug:
+https://bugs.freedesktop.org/show_bug.cgi?id=82889
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/si_dpm.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/radeon/si_dpm.c
++++ b/drivers/gpu/drm/radeon/si_dpm.c
+@@ -6200,7 +6200,7 @@ static void si_parse_pplib_clock_info(st
+       if ((rps->class2 & ATOM_PPLIB_CLASSIFICATION2_ULV) &&
+           index == 0) {
+               /* XXX disable for A0 tahiti */
+-              si_pi->ulv.supported = true;
++              si_pi->ulv.supported = false;
+               si_pi->ulv.pl = *pl;
+               si_pi->ulv.one_pcie_lane_in_ulv = false;
+               si_pi->ulv.volt_change_delay = SISLANDS_ULVVOLTAGECHANGEDELAY_DFLT;
diff --git a/queue-3.14/drm-radeon-remove-invalid-pci-id.patch b/queue-3.14/drm-radeon-remove-invalid-pci-id.patch
new file mode 100644 (file)
index 0000000..b446149
--- /dev/null
@@ -0,0 +1,30 @@
+From 8c3e434769b1707fd2d24de5a2eb25fedc634c4a Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Sun, 26 Oct 2014 15:18:42 -0400
+Subject: drm/radeon: remove invalid pci id
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 8c3e434769b1707fd2d24de5a2eb25fedc634c4a upstream.
+
+0x4c6e is a secondary device id so should not be used
+by the driver.
+
+Noticed-by: Mark Kettenis <mark.kettenis@xs4all.nl>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/drm/drm_pciids.h |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/include/drm/drm_pciids.h
++++ b/include/drm/drm_pciids.h
+@@ -74,7 +74,6 @@
+       {0x1002, 0x4C64, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \
+       {0x1002, 0x4C66, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \
+       {0x1002, 0x4C67, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV250|RADEON_IS_MOBILITY}, \
+-      {0x1002, 0x4C6E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280|RADEON_IS_MOBILITY}, \
+       {0x1002, 0x4E44, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \
+       {0x1002, 0x4E45, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \
+       {0x1002, 0x4E46, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R300}, \
diff --git a/queue-3.14/drm-vmwgfx-filter-out-modes-those-cannot-be-supported-by-the-current-vram-size.patch b/queue-3.14/drm-vmwgfx-filter-out-modes-those-cannot-be-supported-by-the-current-vram-size.patch
new file mode 100644 (file)
index 0000000..950186e
--- /dev/null
@@ -0,0 +1,80 @@
+From 9a72384d86b26cb8a2b25106677e1197f606668f Mon Sep 17 00:00:00 2001
+From: Sinclair Yeh <syeh@vmware.com>
+Date: Fri, 31 Oct 2014 09:58:06 +0100
+Subject: drm/vmwgfx: Filter out modes those cannot be supported by the current VRAM size.
+
+From: Sinclair Yeh <syeh@vmware.com>
+
+commit 9a72384d86b26cb8a2b25106677e1197f606668f upstream.
+
+When screen objects are enabled, the bpp is assumed to be 32, otherwise
+it is set to 16.
+
+v2:
+* Use u32 instead of u64 for assumed_bpp.
+* Fixed mechanism to check for screen objects
+* Limit the back buffer size to VRAM.
+
+Signed-off-by: Sinclair Yeh <syeh@vmware.com>
+Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/vmwgfx/vmwgfx_drv.c |    6 +++++-
+ drivers/gpu/drm/vmwgfx/vmwgfx_kms.c |   16 +++++++++++++---
+ 2 files changed, 18 insertions(+), 4 deletions(-)
+
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+@@ -688,7 +688,11 @@ static int vmw_driver_load(struct drm_de
+               goto out_err0;
+       }
+-      if (unlikely(dev_priv->prim_bb_mem < dev_priv->vram_size))
++      /*
++       * Limit back buffer size to VRAM size.  Remove this once
++       * screen targets are implemented.
++       */
++      if (dev_priv->prim_bb_mem > dev_priv->vram_size)
+               dev_priv->prim_bb_mem = dev_priv->vram_size;
+       mutex_unlock(&dev_priv->hw_mutex);
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+@@ -1954,6 +1954,14 @@ int vmw_du_connector_fill_modes(struct d
+               DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC)
+       };
+       int i;
++      u32 assumed_bpp = 2;
++
++      /*
++       * If using screen objects, then assume 32-bpp because that's what the
++       * SVGA device is assuming
++       */
++      if (dev_priv->sou_priv)
++              assumed_bpp = 4;
+       /* Add preferred mode */
+       {
+@@ -1964,8 +1972,9 @@ int vmw_du_connector_fill_modes(struct d
+               mode->vdisplay = du->pref_height;
+               vmw_guess_mode_timing(mode);
+-              if (vmw_kms_validate_mode_vram(dev_priv, mode->hdisplay * 2,
+-                                             mode->vdisplay)) {
++              if (vmw_kms_validate_mode_vram(dev_priv,
++                                              mode->hdisplay * assumed_bpp,
++                                              mode->vdisplay)) {
+                       drm_mode_probed_add(connector, mode);
+               } else {
+                       drm_mode_destroy(dev, mode);
+@@ -1987,7 +1996,8 @@ int vmw_du_connector_fill_modes(struct d
+                   bmode->vdisplay > max_height)
+                       continue;
+-              if (!vmw_kms_validate_mode_vram(dev_priv, bmode->hdisplay * 2,
++              if (!vmw_kms_validate_mode_vram(dev_priv,
++                                              bmode->hdisplay * assumed_bpp,
+                                               bmode->vdisplay))
+                       continue;
diff --git a/queue-3.14/i2c-at91-don-t-account-as-iowait.patch b/queue-3.14/i2c-at91-don-t-account-as-iowait.patch
new file mode 100644 (file)
index 0000000..453c7e1
--- /dev/null
@@ -0,0 +1,32 @@
+From 11cfbfb098b22d3e57f1f2be217cad20e2d48463 Mon Sep 17 00:00:00 2001
+From: Wolfram Sang <wsa@the-dreams.de>
+Date: Mon, 3 Nov 2014 21:16:16 +0100
+Subject: i2c: at91: don't account as iowait
+
+From: Wolfram Sang <wsa@the-dreams.de>
+
+commit 11cfbfb098b22d3e57f1f2be217cad20e2d48463 upstream.
+
+iowait is for blkio [1]. I2C shouldn't use it.
+
+[1] https://lkml.org/lkml/2014/11/3/317
+
+Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
+Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/i2c/busses/i2c-at91.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/i2c/busses/i2c-at91.c
++++ b/drivers/i2c/busses/i2c-at91.c
+@@ -434,7 +434,7 @@ static int at91_do_twi_transfer(struct a
+               }
+       }
+-      ret = wait_for_completion_io_timeout(&dev->cmd_complete,
++      ret = wait_for_completion_timeout(&dev->cmd_complete,
+                                            dev->adapter.timeout);
+       if (ret == 0) {
+               dev_err(dev->dev, "controller timed out\n");
diff --git a/queue-3.14/pinctrl-baytrail-show-output-gpio-state-correctly-on-intel-baytrail.patch b/queue-3.14/pinctrl-baytrail-show-output-gpio-state-correctly-on-intel-baytrail.patch
new file mode 100644 (file)
index 0000000..df0894c
--- /dev/null
@@ -0,0 +1,36 @@
+From d90c33818967c5e5371961604ad98b4dea4fa3f4 Mon Sep 17 00:00:00 2001
+From: David Cohen <david.a.cohen@linux.intel.com>
+Date: Tue, 14 Oct 2014 10:54:37 -0700
+Subject: pinctrl: baytrail: show output gpio state correctly on Intel Baytrail
+
+From: David Cohen <david.a.cohen@linux.intel.com>
+
+commit d90c33818967c5e5371961604ad98b4dea4fa3f4 upstream.
+
+Even if a gpio pin is set to output, we still need to set INPUT_EN
+functionality (by clearing INPUT_EN bit) to be able to read the pin's
+level.
+
+E.g. without this change, we'll always read low level state from sysfs.
+
+Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
+Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
+Reviewed-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/pinctrl/pinctrl-baytrail.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/pinctrl/pinctrl-baytrail.c
++++ b/drivers/pinctrl/pinctrl-baytrail.c
+@@ -263,7 +263,7 @@ static int byt_gpio_direction_output(str
+       spin_lock_irqsave(&vg->lock, flags);
+       reg_val = readl(reg) | BYT_DIR_MASK;
+-      reg_val &= ~BYT_OUTPUT_EN;
++      reg_val &= ~(BYT_OUTPUT_EN | BYT_INPUT_EN);
+       if (value)
+               writel(reg_val | BYT_LEVEL, reg);
diff --git a/queue-3.14/powerpc-use-device_online-offline-instead-of-cpu_up-down.patch b/queue-3.14/powerpc-use-device_online-offline-instead-of-cpu_up-down.patch
new file mode 100644 (file)
index 0000000..6e1a2c9
--- /dev/null
@@ -0,0 +1,54 @@
+From 10ccaf178b2b961d8bca252d647ed7ed8aae2a20 Mon Sep 17 00:00:00 2001
+From: Dan Streetman <ddstreet@ieee.org>
+Date: Fri, 31 Oct 2014 15:41:34 -0400
+Subject: powerpc: use device_online/offline() instead of cpu_up/down()
+
+From: Dan Streetman <ddstreet@ieee.org>
+
+commit 10ccaf178b2b961d8bca252d647ed7ed8aae2a20 upstream.
+
+In powerpc pseries platform dlpar operations, use device_online() and
+device_offline() instead of cpu_up() and cpu_down().
+
+Calling cpu_up/down() directly does not update the cpu device offline
+field, which is used to online/offline a cpu from sysfs. Calling
+device_online/offline() instead keeps the sysfs cpu online value
+correct. The hotplug lock, which is required to be held when calling
+device_online/offline(), is already held when dlpar_online/offline_cpu()
+are called, since they are called only from cpu_probe|release_store().
+
+This patch fixes errors on phyp (PowerVM) systems that have cpu(s)
+added/removed using dlpar operations; without this patch, the
+/sys/devices/system/cpu/cpuN/online nodes do not correctly show the
+online state of added/removed cpus.
+
+Signed-off-by: Dan Streetman <ddstreet@ieee.org>
+Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
+Fixes: 0902a9044fa5 ("Driver core: Use generic offline/online for CPU offline/online")
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/powerpc/platforms/pseries/dlpar.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/powerpc/platforms/pseries/dlpar.c
++++ b/arch/powerpc/platforms/pseries/dlpar.c
+@@ -380,7 +380,7 @@ static int dlpar_online_cpu(struct devic
+                       BUG_ON(get_cpu_current_state(cpu)
+                                       != CPU_STATE_OFFLINE);
+                       cpu_maps_update_done();
+-                      rc = cpu_up(cpu);
++                      rc = device_online(get_cpu_device(cpu));
+                       if (rc)
+                               goto out;
+                       cpu_maps_update_begin();
+@@ -463,7 +463,7 @@ static int dlpar_offline_cpu(struct devi
+                       if (get_cpu_current_state(cpu) == CPU_STATE_ONLINE) {
+                               set_preferred_offline_state(cpu, CPU_STATE_OFFLINE);
+                               cpu_maps_update_done();
+-                              rc = cpu_down(cpu);
++                              rc = device_offline(get_cpu_device(cpu));
+                               if (rc)
+                                       goto out;
+                               cpu_maps_update_begin();
diff --git a/queue-3.14/rbd-fix-error-recovery-in-rbd_obj_read_sync.patch b/queue-3.14/rbd-fix-error-recovery-in-rbd_obj_read_sync.patch
new file mode 100644 (file)
index 0000000..457fb5a
--- /dev/null
@@ -0,0 +1,36 @@
+From a8d4205623ae965e36c68629db306ca0695a2771 Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack@suse.cz>
+Date: Wed, 22 Oct 2014 09:17:24 +0200
+Subject: rbd: Fix error recovery in rbd_obj_read_sync()
+
+From: Jan Kara <jack@suse.cz>
+
+commit a8d4205623ae965e36c68629db306ca0695a2771 upstream.
+
+When we fail to allocate page vector in rbd_obj_read_sync() we just
+basically ignore the problem and continue which will result in an oops
+later. Fix the problem by returning proper error.
+
+CC: Yehuda Sadeh <yehuda@inktank.com>
+CC: Sage Weil <sage@inktank.com>
+CC: ceph-devel@vger.kernel.org
+Coverity-id: 1226882
+Signed-off-by: Jan Kara <jack@suse.cz>
+Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/block/rbd.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/block/rbd.c
++++ b/drivers/block/rbd.c
+@@ -3217,7 +3217,7 @@ static int rbd_obj_read_sync(struct rbd_
+       page_count = (u32) calc_pages_for(offset, length);
+       pages = ceph_alloc_page_vector(page_count, GFP_KERNEL);
+       if (IS_ERR(pages))
+-              ret = PTR_ERR(pages);
++              return PTR_ERR(pages);
+       ret = -ENOMEM;
+       obj_request = rbd_obj_request_create(object_name, offset, length,
diff --git a/queue-3.14/regulator-max77693-fix-use-of-uninitialized-regulator-config.patch b/queue-3.14/regulator-max77693-fix-use-of-uninitialized-regulator-config.patch
new file mode 100644 (file)
index 0000000..0dfffd8
--- /dev/null
@@ -0,0 +1,37 @@
+From ca0c37a0b489bb14bf3e1549e7a8d0c9a17f4919 Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+Date: Mon, 3 Nov 2014 15:07:05 +0100
+Subject: regulator: max77693: Fix use of uninitialized regulator config
+
+From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+
+commit ca0c37a0b489bb14bf3e1549e7a8d0c9a17f4919 upstream.
+
+Driver allocated on stack struct regulator_config but didn't initialize
+it fully. Few fields (driver_data, ena_gpio) were left untouched. This
+lead to using random ena_gpio values as GPIOs for max77693 regulators.
+
+On occasion these values could match real GPIO numbers leading to
+interfering with other drivers and to unsuccessful enable/disable of
+regulator.
+
+Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
+Fixes: 80b022e29bfd ("regulator: max77693: Add max77693 regualtor driver.")
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/regulator/max77693.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/regulator/max77693.c
++++ b/drivers/regulator/max77693.c
+@@ -232,7 +232,7 @@ static int max77693_pmic_probe(struct pl
+       struct max77693_pmic_dev *max77693_pmic;
+       struct max77693_regulator_data *rdata = NULL;
+       int num_rdata, i;
+-      struct regulator_config config;
++      struct regulator_config config = { };
+       num_rdata = max77693_pmic_init_rdata(&pdev->dev, &rdata);
+       if (!rdata || num_rdata <= 0) {
index c689eff3249561895328fd6a64a2eda8d930ad1e..bb2cd770ee50c4d906f97d340fd16436f76e43c9 100644 (file)
@@ -188,3 +188,13 @@ usb-gadget-function-acm-make-f_acm-pass-usb20cv-chapter9.patch
 usb-gadget-udc-core-fix-kernel-oops-with-soft-connect.patch
 usb-gadget-f_fs-remove-redundant-ffs_data_get.patch
 sched-use-rq-rd-in-sched_setaffinity-under-rcu-read-lock.patch
+drm-vmwgfx-filter-out-modes-those-cannot-be-supported-by-the-current-vram-size.patch
+drm-radeon-dpm-disable-ulv-support-on-si.patch
+drm-radeon-remove-invalid-pci-id.patch
+rbd-fix-error-recovery-in-rbd_obj_read_sync.patch
+acer-wmi-add-acpi_backlight-video-quirk-for-the-acer-kav80.patch
+pinctrl-baytrail-show-output-gpio-state-correctly-on-intel-baytrail.patch
+powerpc-use-device_online-offline-instead-of-cpu_up-down.patch
+regulator-max77693-fix-use-of-uninitialized-regulator-config.patch
+i2c-at91-don-t-account-as-iowait.patch
+sysfs-driver-core-fix-glue-dir-race-condition-by-gdp_mutex.patch
diff --git a/queue-3.14/sysfs-driver-core-fix-glue-dir-race-condition-by-gdp_mutex.patch b/queue-3.14/sysfs-driver-core-fix-glue-dir-race-condition-by-gdp_mutex.patch
new file mode 100644 (file)
index 0000000..df6c112
--- /dev/null
@@ -0,0 +1,103 @@
+From e4a60d139060975eb956717e4f63ae348d4d8cc5 Mon Sep 17 00:00:00 2001
+From: Yijing Wang <wangyijing@huawei.com>
+Date: Fri, 7 Nov 2014 12:05:49 +0800
+Subject: sysfs: driver core: Fix glue dir race condition by gdp_mutex
+
+From: Yijing Wang <wangyijing@huawei.com>
+
+commit e4a60d139060975eb956717e4f63ae348d4d8cc5 upstream.
+
+There is a race condition when removing glue directory.
+It can be reproduced in following test:
+
+path 1: Add first child device
+device_add()
+    get_device_parent()
+            /*find parent from glue_dirs.list*/
+            list_for_each_entry(k, &dev->class->p->glue_dirs.list, entry)
+                    if (k->parent == parent_kobj) {
+                            kobj = kobject_get(k);
+                            break;
+                    }
+            ....
+            class_dir_create_and_add()
+
+path2: Remove last child device under glue dir
+device_del()
+    cleanup_device_parent()
+            cleanup_glue_dir()
+                    kobject_put(glue_dir);
+
+If path2 has been called cleanup_glue_dir(), but not
+call kobject_put(glue_dir), the glue dir is still
+in parent's kset list. Meanwhile, path1 find the glue
+dir from the glue_dirs.list. Path2 may release glue dir
+before path1 call kobject_get(). So kernel will report
+the warning and bug_on.
+
+This is a "classic" problem we have of a kref in a list
+that can be found while the last instance could be removed
+at the same time.
+
+This patch reuse gdp_mutex to fix this race condition.
+
+The following calltrace is captured in kernel 3.4, but
+the latest kernel still has this bug.
+
+-----------------------------------------------------
+<4>[ 3965.441471] WARNING: at ...include/linux/kref.h:41 kobject_get+0x33/0x40()
+<4>[ 3965.441474] Hardware name: Romley
+<4>[ 3965.441475] Modules linked in: isd_iop(O) isd_xda(O)...
+...
+<4>[ 3965.441605] Call Trace:
+<4>[ 3965.441611]  [<ffffffff8103717a>] warn_slowpath_common+0x7a/0xb0
+<4>[ 3965.441615]  [<ffffffff810371c5>] warn_slowpath_null+0x15/0x20
+<4>[ 3965.441618]  [<ffffffff81215963>] kobject_get+0x33/0x40
+<4>[ 3965.441624]  [<ffffffff812d1e45>] get_device_parent.isra.11+0x135/0x1f0
+<4>[ 3965.441627]  [<ffffffff812d22d4>] device_add+0xd4/0x6d0
+<4>[ 3965.441631]  [<ffffffff812d0dbc>] ? dev_set_name+0x3c/0x40
+....
+<2>[ 3965.441912] kernel BUG at ..../fs/sysfs/group.c:65!
+<4>[ 3965.441915] invalid opcode: 0000 [#1] SMP
+...
+<4>[ 3965.686743]  [<ffffffff811a677e>] sysfs_create_group+0xe/0x10
+<4>[ 3965.686748]  [<ffffffff810cfb04>] blk_trace_init_sysfs+0x14/0x20
+<4>[ 3965.686753]  [<ffffffff811fcabb>] blk_register_queue+0x3b/0x120
+<4>[ 3965.686756]  [<ffffffff812030bc>] add_disk+0x1cc/0x490
+....
+-------------------------------------------------------
+
+Signed-off-by: Yijing Wang <wangyijing@huawei.com>
+Signed-off-by: Weng Meiling <wengmeiling.weng@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/base/core.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/base/core.c
++++ b/drivers/base/core.c
+@@ -741,12 +741,12 @@ class_dir_create_and_add(struct class *c
+       return &dir->kobj;
+ }
++static DEFINE_MUTEX(gdp_mutex);
+ static struct kobject *get_device_parent(struct device *dev,
+                                        struct device *parent)
+ {
+       if (dev->class) {
+-              static DEFINE_MUTEX(gdp_mutex);
+               struct kobject *kobj = NULL;
+               struct kobject *parent_kobj;
+               struct kobject *k;
+@@ -810,7 +810,9 @@ static void cleanup_glue_dir(struct devi
+           glue_dir->kset != &dev->class->p->glue_dirs)
+               return;
++      mutex_lock(&gdp_mutex);
+       kobject_put(glue_dir);
++      mutex_unlock(&gdp_mutex);
+ }
+ static void cleanup_device_parent(struct device *dev)