]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2020 14:05:29 +0000 (15:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2020 14:05:29 +0000 (15:05 +0100)
added patches:
acpi-sysfs-change-acpi_maskable_gpe_max-to-0x100.patch
drm-msm-include-linux-sched-task.h.patch
hid-i2c-hid-reset-alps-touchpads-on-resume.patch
nfsd4-fix-up-replay_matches_cache.patch
platform-x86-pmc_atom-add-siemens-connect-x300-to-critclk_systems-dmi-table.patch
pm-devfreq-check-null-governor-in-available_governors_show.patch
xfs-don-t-check-for-ag-deadlock-for-realtime-files-in-bunmapi.patch

queue-4.19/acpi-sysfs-change-acpi_maskable_gpe_max-to-0x100.patch [new file with mode: 0644]
queue-4.19/drm-msm-include-linux-sched-task.h.patch [new file with mode: 0644]
queue-4.19/hid-i2c-hid-reset-alps-touchpads-on-resume.patch [new file with mode: 0644]
queue-4.19/nfsd4-fix-up-replay_matches_cache.patch [new file with mode: 0644]
queue-4.19/platform-x86-pmc_atom-add-siemens-connect-x300-to-critclk_systems-dmi-table.patch [new file with mode: 0644]
queue-4.19/pm-devfreq-check-null-governor-in-available_governors_show.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/xfs-don-t-check-for-ag-deadlock-for-realtime-files-in-bunmapi.patch [new file with mode: 0644]

diff --git a/queue-4.19/acpi-sysfs-change-acpi_maskable_gpe_max-to-0x100.patch b/queue-4.19/acpi-sysfs-change-acpi_maskable_gpe_max-to-0x100.patch
new file mode 100644 (file)
index 0000000..2c16128
--- /dev/null
@@ -0,0 +1,72 @@
+From a7583e72a5f22470d3e6fd3b6ba912892242339f Mon Sep 17 00:00:00 2001
+From: Yunfeng Ye <yeyunfeng@huawei.com>
+Date: Thu, 14 Nov 2019 15:16:24 +0800
+Subject: ACPI: sysfs: Change ACPI_MASKABLE_GPE_MAX to 0x100
+
+From: Yunfeng Ye <yeyunfeng@huawei.com>
+
+commit a7583e72a5f22470d3e6fd3b6ba912892242339f upstream.
+
+The commit 0f27cff8597d ("ACPI: sysfs: Make ACPI GPE mask kernel
+parameter cover all GPEs") says:
+  "Use a bitmap of size 0xFF instead of a u64 for the GPE mask so 256
+   GPEs can be masked"
+
+But the masking of GPE 0xFF it not supported and the check condition
+"gpe > ACPI_MASKABLE_GPE_MAX" is not valid because the type of gpe is
+u8.
+
+So modify the macro ACPI_MASKABLE_GPE_MAX to 0x100, and drop the "gpe >
+ACPI_MASKABLE_GPE_MAX" check. In addition, update the docs "Format" for
+acpi_mask_gpe parameter.
+
+Fixes: 0f27cff8597d ("ACPI: sysfs: Make ACPI GPE mask kernel parameter cover all GPEs")
+Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
+[ rjw: Use u16 as gpe data type in acpi_gpe_apply_masked_gpes() ]
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ Documentation/admin-guide/kernel-parameters.txt |    2 +-
+ drivers/acpi/sysfs.c                            |    6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/Documentation/admin-guide/kernel-parameters.txt
++++ b/Documentation/admin-guide/kernel-parameters.txt
+@@ -113,7 +113,7 @@
+                       the GPE dispatcher.
+                       This facility can be used to prevent such uncontrolled
+                       GPE floodings.
+-                      Format: <int>
++                      Format: <byte>
+       acpi_no_auto_serialize  [HW,ACPI]
+                       Disable auto-serialization of AML methods
+--- a/drivers/acpi/sysfs.c
++++ b/drivers/acpi/sysfs.c
+@@ -816,14 +816,14 @@ end:
+  * interface:
+  *   echo unmask > /sys/firmware/acpi/interrupts/gpe00
+  */
+-#define ACPI_MASKABLE_GPE_MAX 0xFF
++#define ACPI_MASKABLE_GPE_MAX 0x100
+ static DECLARE_BITMAP(acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) __initdata;
+ static int __init acpi_gpe_set_masked_gpes(char *val)
+ {
+       u8 gpe;
+-      if (kstrtou8(val, 0, &gpe) || gpe > ACPI_MASKABLE_GPE_MAX)
++      if (kstrtou8(val, 0, &gpe))
+               return -EINVAL;
+       set_bit(gpe, acpi_masked_gpes_map);
+@@ -835,7 +835,7 @@ void __init acpi_gpe_apply_masked_gpes(v
+ {
+       acpi_handle handle;
+       acpi_status status;
+-      u8 gpe;
++      u16 gpe;
+       for_each_set_bit(gpe, acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) {
+               status = acpi_get_gpe_device(gpe, &handle);
diff --git a/queue-4.19/drm-msm-include-linux-sched-task.h.patch b/queue-4.19/drm-msm-include-linux-sched-task.h.patch
new file mode 100644 (file)
index 0000000..6d6745d
--- /dev/null
@@ -0,0 +1,34 @@
+From 70082a52f96a45650dfc3d8cdcd2c42bdac9f6f0 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Wed, 18 Sep 2019 21:57:07 +0200
+Subject: drm/msm: include linux/sched/task.h
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 70082a52f96a45650dfc3d8cdcd2c42bdac9f6f0 upstream.
+
+Without this header file, compile-testing may run into a missing
+declaration:
+
+drivers/gpu/drm/msm/msm_gpu.c:444:4: error: implicit declaration of function 'put_task_struct' [-Werror,-Wimplicit-function-declaration]
+
+Fixes: 482f96324a4e ("drm/msm: Fix task dump in gpu recovery")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
+Signed-off-by: Rob Clark <robdclark@chromium.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/msm/msm_gpu.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/msm/msm_gpu.c
++++ b/drivers/gpu/drm/msm/msm_gpu.c
+@@ -25,6 +25,7 @@
+ #include <linux/pm_opp.h>
+ #include <linux/devfreq.h>
+ #include <linux/devcoredump.h>
++#include <linux/sched/task.h>
+ /*
+  * Power Management:
diff --git a/queue-4.19/hid-i2c-hid-reset-alps-touchpads-on-resume.patch b/queue-4.19/hid-i2c-hid-reset-alps-touchpads-on-resume.patch
new file mode 100644 (file)
index 0000000..004df04
--- /dev/null
@@ -0,0 +1,61 @@
+From fd70466d37bf3fe0118d18c56ddde85b428f86cf Mon Sep 17 00:00:00 2001
+From: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Date: Thu, 7 Nov 2019 22:28:11 +0800
+Subject: HID: i2c-hid: Reset ALPS touchpads on resume
+
+From: Kai-Heng Feng <kai.heng.feng@canonical.com>
+
+commit fd70466d37bf3fe0118d18c56ddde85b428f86cf upstream.
+
+Commit 52cf93e63ee6 ("HID: i2c-hid: Don't reset device upon system
+resume") fixes many touchpads and touchscreens, however ALPS touchpads
+start to trigger IRQ storm after system resume.
+
+Since it's total silence from ALPS, let's bring the old behavior back
+to ALPS touchpads.
+
+Fixes: 52cf93e63ee6 ("HID: i2c-hid: Don't reset device upon system resume")
+Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hid/i2c-hid/i2c-hid-core.c |   12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+--- a/drivers/hid/i2c-hid/i2c-hid-core.c
++++ b/drivers/hid/i2c-hid/i2c-hid-core.c
+@@ -51,6 +51,7 @@
+ #define I2C_HID_QUIRK_NO_RUNTIME_PM           BIT(2)
+ #define I2C_HID_QUIRK_DELAY_AFTER_SLEEP               BIT(3)
+ #define I2C_HID_QUIRK_BOGUS_IRQ                       BIT(4)
++#define I2C_HID_QUIRK_RESET_ON_RESUME         BIT(5)
+ /* flags */
+ #define I2C_HID_STARTED               0
+@@ -182,6 +183,8 @@ static const struct i2c_hid_quirks {
+               I2C_HID_QUIRK_NO_RUNTIME_PM },
+       { USB_VENDOR_ID_ELAN, HID_ANY_ID,
+                I2C_HID_QUIRK_BOGUS_IRQ },
++      { USB_VENDOR_ID_ALPS_JP, HID_ANY_ID,
++               I2C_HID_QUIRK_RESET_ON_RESUME },
+       { 0, 0 }
+ };
+@@ -1290,8 +1293,15 @@ static int i2c_hid_resume(struct device
+        * solves "incomplete reports" on Raydium devices 2386:3118 and
+        * 2386:4B33 and fixes various SIS touchscreens no longer sending
+        * data after a suspend/resume.
++       *
++       * However some ALPS touchpads generate IRQ storm without reset, so
++       * let's still reset them here.
+        */
+-      ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
++      if (ihid->quirks & I2C_HID_QUIRK_RESET_ON_RESUME)
++              ret = i2c_hid_hwreset(client);
++      else
++              ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
++
+       if (ret)
+               return ret;
diff --git a/queue-4.19/nfsd4-fix-up-replay_matches_cache.patch b/queue-4.19/nfsd4-fix-up-replay_matches_cache.patch
new file mode 100644 (file)
index 0000000..921428b
--- /dev/null
@@ -0,0 +1,52 @@
+From 6e73e92b155c868ff7fce9d108839668caf1d9be Mon Sep 17 00:00:00 2001
+From: Scott Mayhew <smayhew@redhat.com>
+Date: Wed, 9 Oct 2019 15:11:37 -0400
+Subject: nfsd4: fix up replay_matches_cache()
+
+From: Scott Mayhew <smayhew@redhat.com>
+
+commit 6e73e92b155c868ff7fce9d108839668caf1d9be upstream.
+
+When running an nfs stress test, I see quite a few cached replies that
+don't match up with the actual request.  The first comment in
+replay_matches_cache() makes sense, but the code doesn't seem to
+match... fix it.
+
+This isn't exactly a bugfix, as the server isn't required to catch every
+case of a false retry.  So, we may as well do this, but if this is
+fixing a problem then that suggests there's a client bug.
+
+Fixes: 53da6a53e1d4 ("nfsd4: catch some false session retries")
+Signed-off-by: Scott Mayhew <smayhew@redhat.com>
+Signed-off-by: J. Bruce Fields <bfields@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nfsd/nfs4state.c |   15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+--- a/fs/nfsd/nfs4state.c
++++ b/fs/nfsd/nfs4state.c
+@@ -3072,12 +3072,17 @@ static bool replay_matches_cache(struct
+           (bool)seq->cachethis)
+               return false;
+       /*
+-       * If there's an error than the reply can have fewer ops than
+-       * the call.  But if we cached a reply with *more* ops than the
+-       * call you're sending us now, then this new call is clearly not
+-       * really a replay of the old one:
++       * If there's an error then the reply can have fewer ops than
++       * the call.
+        */
+-      if (slot->sl_opcnt < argp->opcnt)
++      if (slot->sl_opcnt < argp->opcnt && !slot->sl_status)
++              return false;
++      /*
++       * But if we cached a reply with *more* ops than the call you're
++       * sending us now, then this new call is clearly not really a
++       * replay of the old one:
++       */
++      if (slot->sl_opcnt > argp->opcnt)
+               return false;
+       /* This is the only check explicitly called by spec: */
+       if (!same_creds(&rqstp->rq_cred, &slot->sl_cred))
diff --git a/queue-4.19/platform-x86-pmc_atom-add-siemens-connect-x300-to-critclk_systems-dmi-table.patch b/queue-4.19/platform-x86-pmc_atom-add-siemens-connect-x300-to-critclk_systems-dmi-table.patch
new file mode 100644 (file)
index 0000000..53460f7
--- /dev/null
@@ -0,0 +1,40 @@
+From e8796c6c69d129420ee94a1906b18d86b84644d4 Mon Sep 17 00:00:00 2001
+From: Michael Haener <michael.haener@siemens.com>
+Date: Fri, 29 Nov 2019 10:16:49 +0100
+Subject: platform/x86: pmc_atom: Add Siemens CONNECT X300 to critclk_systems DMI table
+
+From: Michael Haener <michael.haener@siemens.com>
+
+commit e8796c6c69d129420ee94a1906b18d86b84644d4 upstream.
+
+The CONNECT X300 uses the PMC clock for on-board components and gets
+stuck during boot if the clock is disabled. Therefore, add this
+device to the critical systems list.
+Tested on CONNECT X300.
+
+Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
+Signed-off-by: Michael Haener <michael.haener@siemens.com>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/platform/x86/pmc_atom.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/platform/x86/pmc_atom.c
++++ b/drivers/platform/x86/pmc_atom.c
+@@ -452,6 +452,14 @@ static const struct dmi_system_id critcl
+                       DMI_MATCH(DMI_PRODUCT_VERSION, "6ES7647-8B"),
+               },
+       },
++      {
++              .ident = "CONNECT X300",
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "SIEMENS AG"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION, "A5E45074588"),
++              },
++      },
++
+       { /*sentinel*/ }
+ };
diff --git a/queue-4.19/pm-devfreq-check-null-governor-in-available_governors_show.patch b/queue-4.19/pm-devfreq-check-null-governor-in-available_governors_show.patch
new file mode 100644 (file)
index 0000000..dc4636f
--- /dev/null
@@ -0,0 +1,34 @@
+From d68adc8f85cd757bd33c8d7b2660ad6f16f7f3dc Mon Sep 17 00:00:00 2001
+From: Leonard Crestez <leonard.crestez@nxp.com>
+Date: Tue, 24 Sep 2019 10:26:53 +0300
+Subject: PM / devfreq: Check NULL governor in available_governors_show
+
+From: Leonard Crestez <leonard.crestez@nxp.com>
+
+commit d68adc8f85cd757bd33c8d7b2660ad6f16f7f3dc upstream.
+
+The governor is initialized after sysfs attributes become visible so in
+theory the governor field can be NULL here.
+
+Fixes: bcf23c79c4e46 ("PM / devfreq: Fix available_governor sysfs")
+Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
+Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
+Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
+Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/devfreq/devfreq.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/devfreq/devfreq.c
++++ b/drivers/devfreq/devfreq.c
+@@ -1086,7 +1086,7 @@ static ssize_t available_governors_show(
+        * The devfreq with immutable governor (e.g., passive) shows
+        * only own governor.
+        */
+-      if (df->governor->immutable) {
++      if (df->governor && df->governor->immutable) {
+               count = scnprintf(&buf[count], DEVFREQ_NAME_LEN,
+                                  "%s ", df->governor_name);
+       /*
index a1116805faa26c6db69553fc8774a25ff30214db..56886b58f69e3274c977e3fc23a0d15324ed66e8 100644 (file)
@@ -75,3 +75,10 @@ alsa-firewire-motu-correct-a-typo-in-the-clock-proc-string.patch
 exit-panic-before-exit_mm-on-global-init-exit.patch
 arm64-revert-support-for-execute-only-user-mappings.patch
 ftrace-avoid-potential-division-by-zero-in-function-profiler.patch
+drm-msm-include-linux-sched-task.h.patch
+pm-devfreq-check-null-governor-in-available_governors_show.patch
+nfsd4-fix-up-replay_matches_cache.patch
+hid-i2c-hid-reset-alps-touchpads-on-resume.patch
+acpi-sysfs-change-acpi_maskable_gpe_max-to-0x100.patch
+xfs-don-t-check-for-ag-deadlock-for-realtime-files-in-bunmapi.patch
+platform-x86-pmc_atom-add-siemens-connect-x300-to-critclk_systems-dmi-table.patch
diff --git a/queue-4.19/xfs-don-t-check-for-ag-deadlock-for-realtime-files-in-bunmapi.patch b/queue-4.19/xfs-don-t-check-for-ag-deadlock-for-realtime-files-in-bunmapi.patch
new file mode 100644 (file)
index 0000000..ab063b8
--- /dev/null
@@ -0,0 +1,40 @@
+From 69ffe5960df16938bccfe1b65382af0b3de51265 Mon Sep 17 00:00:00 2001
+From: Omar Sandoval <osandov@fb.com>
+Date: Tue, 26 Nov 2019 16:58:08 -0800
+Subject: xfs: don't check for AG deadlock for realtime files in bunmapi
+
+From: Omar Sandoval <osandov@fb.com>
+
+commit 69ffe5960df16938bccfe1b65382af0b3de51265 upstream.
+
+Commit 5b094d6dac04 ("xfs: fix multi-AG deadlock in xfs_bunmapi") added
+a check in __xfs_bunmapi() to stop early if we would touch multiple AGs
+in the wrong order. However, this check isn't applicable for realtime
+files. In most cases, it just makes us do unnecessary commits. However,
+without the fix from the previous commit ("xfs: fix realtime file data
+space leak"), if the last and second-to-last extents also happen to have
+different "AG numbers", then the break actually causes __xfs_bunmapi()
+to return without making any progress, which sends
+xfs_itruncate_extents_flags() into an infinite loop.
+
+Fixes: 5b094d6dac04 ("xfs: fix multi-AG deadlock in xfs_bunmapi")
+Signed-off-by: Omar Sandoval <osandov@fb.com>
+Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/xfs/libxfs/xfs_bmap.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/xfs/libxfs/xfs_bmap.c
++++ b/fs/xfs/libxfs/xfs_bmap.c
+@@ -5239,7 +5239,7 @@ __xfs_bunmapi(
+                * Make sure we don't touch multiple AGF headers out of order
+                * in a single transaction, as that could cause AB-BA deadlocks.
+                */
+-              if (!wasdel) {
++              if (!wasdel && !isrt) {
+                       agno = XFS_FSB_TO_AGNO(mp, del.br_startblock);
+                       if (prev_agno != NULLAGNUMBER && prev_agno > agno)
+                               break;