]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Apr 2020 17:36:28 +0000 (19:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Apr 2020 17:36:28 +0000 (19:36 +0200)
added patches:
alsa-hda-don-t-release-card-at-firmware-loading-error.patch
arm-dts-imx6-use-gpc-for-fec-interrupt-controller-to-fix-wake-on-lan.patch
irqchip-mbigen-free-msi_desc-on-device-teardown.patch
lib-raid6-use-vdupq_n_u8-to-avoid-endianness-warnings.patch
netfilter-nf_tables-report-eopnotsupp-on-unsupported-flags-object-type.patch
of-overlay-kmemleak-in-dup_and_fixup_symbol_prop.patch
of-unittest-kmemleak-in-of_unittest_overlay_high_level.patch
of-unittest-kmemleak-in-of_unittest_platform_populate.patch
of-unittest-kmemleak-on-changeset-destroy.patch
video-fbdev-sis-remove-unnecessary-parentheses-and-commented-code.patch
x86-hyper-v-report-crash-register-data-or-kmsg-before-running-crash-kernel.patch

12 files changed:
queue-4.19/alsa-hda-don-t-release-card-at-firmware-loading-error.patch [new file with mode: 0644]
queue-4.19/arm-dts-imx6-use-gpc-for-fec-interrupt-controller-to-fix-wake-on-lan.patch [new file with mode: 0644]
queue-4.19/irqchip-mbigen-free-msi_desc-on-device-teardown.patch [new file with mode: 0644]
queue-4.19/lib-raid6-use-vdupq_n_u8-to-avoid-endianness-warnings.patch [new file with mode: 0644]
queue-4.19/netfilter-nf_tables-report-eopnotsupp-on-unsupported-flags-object-type.patch [new file with mode: 0644]
queue-4.19/of-overlay-kmemleak-in-dup_and_fixup_symbol_prop.patch [new file with mode: 0644]
queue-4.19/of-unittest-kmemleak-in-of_unittest_overlay_high_level.patch [new file with mode: 0644]
queue-4.19/of-unittest-kmemleak-in-of_unittest_platform_populate.patch [new file with mode: 0644]
queue-4.19/of-unittest-kmemleak-on-changeset-destroy.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/video-fbdev-sis-remove-unnecessary-parentheses-and-commented-code.patch [new file with mode: 0644]
queue-4.19/x86-hyper-v-report-crash-register-data-or-kmsg-before-running-crash-kernel.patch [new file with mode: 0644]

diff --git a/queue-4.19/alsa-hda-don-t-release-card-at-firmware-loading-error.patch b/queue-4.19/alsa-hda-don-t-release-card-at-firmware-loading-error.patch
new file mode 100644 (file)
index 0000000..5b8043e
--- /dev/null
@@ -0,0 +1,59 @@
+From 25faa4bd37c10f19e4b848b9032a17a3d44c6f09 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 13 Apr 2020 10:20:29 +0200
+Subject: ALSA: hda: Don't release card at firmware loading error
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 25faa4bd37c10f19e4b848b9032a17a3d44c6f09 upstream.
+
+At the error path of the firmware loading error, the driver tries to
+release the card object and set NULL to drvdata.  This may be referred
+badly at the possible PM action, as the driver itself is still bound
+and the PM callbacks read the card object.
+
+Instead, we continue the probing as if it were no option set.  This is
+often a better choice than the forced abort, too.
+
+Fixes: 5cb543dba986 ("ALSA: hda - Deferred probing with request_firmware_nowait()")
+BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207043
+Link: https://lore.kernel.org/r/20200413082034.25166-2-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/hda_intel.c |   19 +++++--------------
+ 1 file changed, 5 insertions(+), 14 deletions(-)
+
+--- a/sound/pci/hda/hda_intel.c
++++ b/sound/pci/hda/hda_intel.c
+@@ -2076,24 +2076,15 @@ static void azx_firmware_cb(const struct
+ {
+       struct snd_card *card = context;
+       struct azx *chip = card->private_data;
+-      struct pci_dev *pci = chip->pci;
+-      if (!fw) {
+-              dev_err(card->dev, "Cannot load firmware, aborting\n");
+-              goto error;
+-      }
+-
+-      chip->fw = fw;
++      if (fw)
++              chip->fw = fw;
++      else
++              dev_err(card->dev, "Cannot load firmware, continue without patching\n");
+       if (!chip->disabled) {
+               /* continue probing */
+-              if (azx_probe_continue(chip))
+-                      goto error;
++              azx_probe_continue(chip);
+       }
+-      return; /* OK */
+-
+- error:
+-      snd_card_free(card);
+-      pci_set_drvdata(pci, NULL);
+ }
+ #endif
diff --git a/queue-4.19/arm-dts-imx6-use-gpc-for-fec-interrupt-controller-to-fix-wake-on-lan.patch b/queue-4.19/arm-dts-imx6-use-gpc-for-fec-interrupt-controller-to-fix-wake-on-lan.patch
new file mode 100644 (file)
index 0000000..23e5ce5
--- /dev/null
@@ -0,0 +1,56 @@
+From 4141f1a40fc0789f6fd4330e171e1edf155426aa Mon Sep 17 00:00:00 2001
+From: Martin Fuzzey <martin.fuzzey@flowbird.group>
+Date: Thu, 2 Apr 2020 15:51:28 +0200
+Subject: ARM: dts: imx6: Use gpc for FEC interrupt controller to fix wake on LAN.
+
+From: Martin Fuzzey <martin.fuzzey@flowbird.group>
+
+commit 4141f1a40fc0789f6fd4330e171e1edf155426aa upstream.
+
+In order to wake from suspend by ethernet magic packets the GPC
+must be used as intc does not have wakeup functionality.
+
+But the FEC DT node currently uses interrupt-extended,
+specificying intc, thus breaking WoL.
+
+This problem is probably fallout from the stacked domain conversion
+as intc used to chain to GPC.
+
+So replace "interrupts-extended" by "interrupts" to use the default
+parent which is GPC.
+
+Fixes: b923ff6af0d5 ("ARM: imx6: convert GPC to stacked domains")
+
+Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/imx6qdl.dtsi |    5 ++---
+ arch/arm/boot/dts/imx6qp.dtsi  |    1 -
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+--- a/arch/arm/boot/dts/imx6qdl.dtsi
++++ b/arch/arm/boot/dts/imx6qdl.dtsi
+@@ -1013,9 +1013,8 @@
+                               compatible = "fsl,imx6q-fec";
+                               reg = <0x02188000 0x4000>;
+                               interrupt-names = "int0", "pps";
+-                              interrupts-extended =
+-                                      <&intc 0 118 IRQ_TYPE_LEVEL_HIGH>,
+-                                      <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
++                              interrupts = <0 118 IRQ_TYPE_LEVEL_HIGH>,
++                                           <0 119 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6QDL_CLK_ENET>,
+                                        <&clks IMX6QDL_CLK_ENET>,
+                                        <&clks IMX6QDL_CLK_ENET_REF>;
+--- a/arch/arm/boot/dts/imx6qp.dtsi
++++ b/arch/arm/boot/dts/imx6qp.dtsi
+@@ -77,7 +77,6 @@
+ };
+ &fec {
+-      /delete-property/interrupts-extended;
+       interrupts = <0 118 IRQ_TYPE_LEVEL_HIGH>,
+                    <0 119 IRQ_TYPE_LEVEL_HIGH>;
+ };
diff --git a/queue-4.19/irqchip-mbigen-free-msi_desc-on-device-teardown.patch b/queue-4.19/irqchip-mbigen-free-msi_desc-on-device-teardown.patch
new file mode 100644 (file)
index 0000000..bf9c7bb
--- /dev/null
@@ -0,0 +1,43 @@
+From edfc23f6f9fdbd7825d50ac1f380243cde19b679 Mon Sep 17 00:00:00 2001
+From: Zenghui Yu <yuzenghui@huawei.com>
+Date: Wed, 8 Apr 2020 19:43:52 +0800
+Subject: irqchip/mbigen: Free msi_desc on device teardown
+
+From: Zenghui Yu <yuzenghui@huawei.com>
+
+commit edfc23f6f9fdbd7825d50ac1f380243cde19b679 upstream.
+
+Using irq_domain_free_irqs_common() on the irqdomain free path will
+leave the MSI descriptor unfreed when platform devices get removed.
+Properly free it by MSI domain free function.
+
+Fixes: 9650c60ebfec0 ("irqchip/mbigen: Create irq domain for each mbigen device")
+Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
+Signed-off-by: Marc Zyngier <maz@kernel.org>
+Link: https://lore.kernel.org/r/20200408114352.1604-1-yuzenghui@huawei.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/irqchip/irq-mbigen.c |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/irqchip/irq-mbigen.c
++++ b/drivers/irqchip/irq-mbigen.c
+@@ -231,10 +231,16 @@ static int mbigen_irq_domain_alloc(struc
+       return 0;
+ }
++static void mbigen_irq_domain_free(struct irq_domain *domain, unsigned int virq,
++                                 unsigned int nr_irqs)
++{
++      platform_msi_domain_free(domain, virq, nr_irqs);
++}
++
+ static const struct irq_domain_ops mbigen_domain_ops = {
+       .translate      = mbigen_domain_translate,
+       .alloc          = mbigen_irq_domain_alloc,
+-      .free           = irq_domain_free_irqs_common,
++      .free           = mbigen_irq_domain_free,
+ };
+ static int mbigen_of_create_domain(struct platform_device *pdev,
diff --git a/queue-4.19/lib-raid6-use-vdupq_n_u8-to-avoid-endianness-warnings.patch b/queue-4.19/lib-raid6-use-vdupq_n_u8-to-avoid-endianness-warnings.patch
new file mode 100644 (file)
index 0000000..d2f3465
--- /dev/null
@@ -0,0 +1,90 @@
+From 1ad3935b39da78a403e7df7a3813f866c731bc64 Mon Sep 17 00:00:00 2001
+From: "ndesaulniers@google.com" <ndesaulniers@google.com>
+Date: Mon, 25 Feb 2019 20:03:42 -0800
+Subject: lib/raid6: use vdupq_n_u8 to avoid endianness warnings
+
+From: ndesaulniers@google.com <ndesaulniers@google.com>
+
+commit 1ad3935b39da78a403e7df7a3813f866c731bc64 upstream.
+
+Clang warns: vector initializers are not compatible with NEON intrinsics
+in big endian mode [-Wnonportable-vector-initialization]
+
+While this is usually the case, it's not an issue for this case since
+we're initializing the uint8x16_t (16x uint8_t's) with the same value.
+
+Instead, use vdupq_n_u8 which both compilers lower into a single movi
+instruction: https://godbolt.org/z/vBrgzt
+
+This avoids the static storage for a constant value.
+
+Link: https://github.com/ClangBuiltLinux/linux/issues/214
+Suggested-by: Nathan Chancellor <natechancellor@gmail.com>
+Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ lib/raid6/neon.uc            |    5 ++---
+ lib/raid6/recov_neon_inner.c |    7 ++-----
+ 2 files changed, 4 insertions(+), 8 deletions(-)
+
+--- a/lib/raid6/neon.uc
++++ b/lib/raid6/neon.uc
+@@ -28,7 +28,6 @@
+ typedef uint8x16_t unative_t;
+-#define NBYTES(x) ((unative_t){x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x})
+ #define NSIZE sizeof(unative_t)
+ /*
+@@ -61,7 +60,7 @@ void raid6_neon$#_gen_syndrome_real(int
+       int d, z, z0;
+       register unative_t wd$$, wq$$, wp$$, w1$$, w2$$;
+-      const unative_t x1d = NBYTES(0x1d);
++      const unative_t x1d = vdupq_n_u8(0x1d);
+       z0 = disks - 3;         /* Highest data disk */
+       p = dptr[z0+1];         /* XOR parity */
+@@ -92,7 +91,7 @@ void raid6_neon$#_xor_syndrome_real(int
+       int d, z, z0;
+       register unative_t wd$$, wq$$, wp$$, w1$$, w2$$;
+-      const unative_t x1d = NBYTES(0x1d);
++      const unative_t x1d = vdupq_n_u8(0x1d);
+       z0 = stop;              /* P/Q right side optimization */
+       p = dptr[disks-2];      /* XOR parity */
+--- a/lib/raid6/recov_neon_inner.c
++++ b/lib/raid6/recov_neon_inner.c
+@@ -10,11 +10,6 @@
+ #include <arm_neon.h>
+-static const uint8x16_t x0f = {
+-      0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
+-      0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
+-};
+-
+ #ifdef CONFIG_ARM
+ /*
+  * AArch32 does not provide this intrinsic natively because it does not
+@@ -41,6 +36,7 @@ void __raid6_2data_recov_neon(int bytes,
+       uint8x16_t pm1 = vld1q_u8(pbmul + 16);
+       uint8x16_t qm0 = vld1q_u8(qmul);
+       uint8x16_t qm1 = vld1q_u8(qmul + 16);
++      uint8x16_t x0f = vdupq_n_u8(0x0f);
+       /*
+        * while ( bytes-- ) {
+@@ -87,6 +83,7 @@ void __raid6_datap_recov_neon(int bytes,
+ {
+       uint8x16_t qm0 = vld1q_u8(qmul);
+       uint8x16_t qm1 = vld1q_u8(qmul + 16);
++      uint8x16_t x0f = vdupq_n_u8(0x0f);
+       /*
+        * while (bytes--) {
diff --git a/queue-4.19/netfilter-nf_tables-report-eopnotsupp-on-unsupported-flags-object-type.patch b/queue-4.19/netfilter-nf_tables-report-eopnotsupp-on-unsupported-flags-object-type.patch
new file mode 100644 (file)
index 0000000..8f93b35
--- /dev/null
@@ -0,0 +1,41 @@
+From d9583cdf2f38d0f526d9a8c8564dd2e35e649bc7 Mon Sep 17 00:00:00 2001
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Tue, 7 Apr 2020 14:10:11 +0200
+Subject: netfilter: nf_tables: report EOPNOTSUPP on unsupported flags/object type
+
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+
+commit d9583cdf2f38d0f526d9a8c8564dd2e35e649bc7 upstream.
+
+EINVAL should be used for malformed netlink messages. New userspace
+utility and old kernels might easily result in EINVAL when exercising
+new set features, which is misleading.
+
+Fixes: 8aeff920dcc9 ("netfilter: nf_tables: add stateful object reference to set elements")
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/netfilter/nf_tables_api.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/net/netfilter/nf_tables_api.c
++++ b/net/netfilter/nf_tables_api.c
+@@ -3450,7 +3450,7 @@ static int nf_tables_newset(struct net *
+                             NFT_SET_INTERVAL | NFT_SET_TIMEOUT |
+                             NFT_SET_MAP | NFT_SET_EVAL |
+                             NFT_SET_OBJECT))
+-                      return -EINVAL;
++                      return -EOPNOTSUPP;
+               /* Only one of these operations is supported */
+               if ((flags & (NFT_SET_MAP | NFT_SET_OBJECT)) ==
+                            (NFT_SET_MAP | NFT_SET_OBJECT))
+@@ -3488,7 +3488,7 @@ static int nf_tables_newset(struct net *
+               objtype = ntohl(nla_get_be32(nla[NFTA_SET_OBJ_TYPE]));
+               if (objtype == NFT_OBJECT_UNSPEC ||
+                   objtype > NFT_OBJECT_MAX)
+-                      return -EINVAL;
++                      return -EOPNOTSUPP;
+       } else if (flags & NFT_SET_OBJECT)
+               return -EINVAL;
+       else
diff --git a/queue-4.19/of-overlay-kmemleak-in-dup_and_fixup_symbol_prop.patch b/queue-4.19/of-overlay-kmemleak-in-dup_and_fixup_symbol_prop.patch
new file mode 100644 (file)
index 0000000..9fb37b1
--- /dev/null
@@ -0,0 +1,35 @@
+From 478ff649b1c8eb2409b1a54fb75eb46f7c29f140 Mon Sep 17 00:00:00 2001
+From: Frank Rowand <frank.rowand@sony.com>
+Date: Thu, 16 Apr 2020 16:42:49 -0500
+Subject: of: overlay: kmemleak in dup_and_fixup_symbol_prop()
+
+From: Frank Rowand <frank.rowand@sony.com>
+
+commit 478ff649b1c8eb2409b1a54fb75eb46f7c29f140 upstream.
+
+kmemleak reports several memory leaks from devicetree unittest.
+This is the fix for problem 4 of 5.
+
+target_path was not freed in the non-error path.
+
+Fixes: e0a58f3e08d4 ("of: overlay: remove a dependency on device node full_name")
+Reported-by: Erhard F. <erhard_f@mailbox.org>
+Signed-off-by: Frank Rowand <frank.rowand@sony.com>
+Signed-off-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/of/overlay.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/of/overlay.c
++++ b/drivers/of/overlay.c
+@@ -261,6 +261,8 @@ static struct property *dup_and_fixup_sy
+       of_property_set_flag(new_prop, OF_DYNAMIC);
++      kfree(target_path);
++
+       return new_prop;
+ err_free_new_prop:
diff --git a/queue-4.19/of-unittest-kmemleak-in-of_unittest_overlay_high_level.patch b/queue-4.19/of-unittest-kmemleak-in-of_unittest_overlay_high_level.patch
new file mode 100644 (file)
index 0000000..a82b4e6
--- /dev/null
@@ -0,0 +1,40 @@
+From 145fc138f9aae4f9e1331352e301df28e16aed35 Mon Sep 17 00:00:00 2001
+From: Frank Rowand <frank.rowand@sony.com>
+Date: Thu, 16 Apr 2020 16:42:48 -0500
+Subject: of: unittest: kmemleak in of_unittest_overlay_high_level()
+
+From: Frank Rowand <frank.rowand@sony.com>
+
+commit 145fc138f9aae4f9e1331352e301df28e16aed35 upstream.
+
+kmemleak reports several memory leaks from devicetree unittest.
+This is the fix for problem 3 of 5.
+
+of_unittest_overlay_high_level() failed to kfree the newly created
+property when the property named 'name' is skipped.
+
+Fixes: 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT")
+Reported-by: Erhard F. <erhard_f@mailbox.org>
+Signed-off-by: Frank Rowand <frank.rowand@sony.com>
+Signed-off-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/of/unittest.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/of/unittest.c
++++ b/drivers/of/unittest.c
+@@ -2448,8 +2448,11 @@ static __init void of_unittest_overlay_h
+                               goto err_unlock;
+                       }
+                       if (__of_add_property(of_symbols, new_prop)) {
++                              kfree(new_prop->name);
++                              kfree(new_prop->value);
++                              kfree(new_prop);
+                               /* "name" auto-generated by unflatten */
+-                              if (!strcmp(new_prop->name, "name"))
++                              if (!strcmp(prop->name, "name"))
+                                       continue;
+                               unittest(0, "duplicate property '%s' in overlay_base node __symbols__",
+                                        prop->name);
diff --git a/queue-4.19/of-unittest-kmemleak-in-of_unittest_platform_populate.patch b/queue-4.19/of-unittest-kmemleak-in-of_unittest_platform_populate.patch
new file mode 100644 (file)
index 0000000..9eead6c
--- /dev/null
@@ -0,0 +1,44 @@
+From 216830d2413cc61be3f76bc02ffd905e47d2439e Mon Sep 17 00:00:00 2001
+From: Frank Rowand <frank.rowand@sony.com>
+Date: Thu, 16 Apr 2020 16:42:47 -0500
+Subject: of: unittest: kmemleak in of_unittest_platform_populate()
+
+From: Frank Rowand <frank.rowand@sony.com>
+
+commit 216830d2413cc61be3f76bc02ffd905e47d2439e upstream.
+
+kmemleak reports several memory leaks from devicetree unittest.
+This is the fix for problem 2 of 5.
+
+of_unittest_platform_populate() left an elevated reference count for
+grandchild nodes (which are platform devices).  Fix the platform
+device reference counts so that the memory will be freed.
+
+Fixes: fb2caa50fbac ("of/selftest: add testcase for nodes with same name and address")
+Reported-by: Erhard F. <erhard_f@mailbox.org>
+Signed-off-by: Frank Rowand <frank.rowand@sony.com>
+Signed-off-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/of/unittest.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/of/unittest.c
++++ b/drivers/of/unittest.c
+@@ -1059,10 +1059,13 @@ static void __init of_unittest_platform_
+       of_platform_populate(np, match, NULL, &test_bus->dev);
+       for_each_child_of_node(np, child) {
+-              for_each_child_of_node(child, grandchild)
+-                      unittest(of_find_device_by_node(grandchild),
++              for_each_child_of_node(child, grandchild) {
++                      pdev = of_find_device_by_node(grandchild);
++                      unittest(pdev,
+                                "Could not create device for node '%pOFn'\n",
+                                grandchild);
++                      of_dev_put(pdev);
++              }
+       }
+       of_platform_depopulate(&test_bus->dev);
diff --git a/queue-4.19/of-unittest-kmemleak-on-changeset-destroy.patch b/queue-4.19/of-unittest-kmemleak-on-changeset-destroy.patch
new file mode 100644 (file)
index 0000000..e62bbb9
--- /dev/null
@@ -0,0 +1,40 @@
+From b3fb36ed694b05738d45218ea72cf7feb10ce2b1 Mon Sep 17 00:00:00 2001
+From: Frank Rowand <frank.rowand@sony.com>
+Date: Thu, 16 Apr 2020 16:42:46 -0500
+Subject: of: unittest: kmemleak on changeset destroy
+
+From: Frank Rowand <frank.rowand@sony.com>
+
+commit b3fb36ed694b05738d45218ea72cf7feb10ce2b1 upstream.
+
+kmemleak reports several memory leaks from devicetree unittest.
+This is the fix for problem 1 of 5.
+
+of_unittest_changeset() reaches deeply into the dynamic devicetree
+functions.  Several nodes were left with an elevated reference
+count and thus were not properly cleaned up.  Fix the reference
+counts so that the memory will be freed.
+
+Fixes: 201c910bd689 ("of: Transactional DT support.")
+Reported-by: Erhard F. <erhard_f@mailbox.org>
+Signed-off-by: Frank Rowand <frank.rowand@sony.com>
+Signed-off-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/of/unittest.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/of/unittest.c
++++ b/drivers/of/unittest.c
+@@ -772,6 +772,10 @@ static void __init of_unittest_changeset
+       unittest(!of_changeset_revert(&chgset), "revert failed\n");
+       of_changeset_destroy(&chgset);
++
++      of_node_put(n1);
++      of_node_put(n2);
++      of_node_put(n21);
+ #endif
+ }
index 71d57844f1f28627b0debe0748a83401c823c838..885736f075bd6e0cf6e1444c5be2fd9ac4698df1 100644 (file)
@@ -4,3 +4,14 @@ scsi-sg-add-sg_remove_request-in-sg_common_write.patch
 ext4-use-non-movable-memory-for-superblock-readahead.patch
 watchdog-sp805-fix-restart-handler.patch
 arm-bpf-fix-bugs-with-alu64-rsh-arsh-bpf_k-shift-by-0.patch
+arm-dts-imx6-use-gpc-for-fec-interrupt-controller-to-fix-wake-on-lan.patch
+netfilter-nf_tables-report-eopnotsupp-on-unsupported-flags-object-type.patch
+irqchip-mbigen-free-msi_desc-on-device-teardown.patch
+alsa-hda-don-t-release-card-at-firmware-loading-error.patch
+of-unittest-kmemleak-on-changeset-destroy.patch
+of-unittest-kmemleak-in-of_unittest_platform_populate.patch
+of-unittest-kmemleak-in-of_unittest_overlay_high_level.patch
+of-overlay-kmemleak-in-dup_and_fixup_symbol_prop.patch
+x86-hyper-v-report-crash-register-data-or-kmsg-before-running-crash-kernel.patch
+lib-raid6-use-vdupq_n_u8-to-avoid-endianness-warnings.patch
+video-fbdev-sis-remove-unnecessary-parentheses-and-commented-code.patch
diff --git a/queue-4.19/video-fbdev-sis-remove-unnecessary-parentheses-and-commented-code.patch b/queue-4.19/video-fbdev-sis-remove-unnecessary-parentheses-and-commented-code.patch
new file mode 100644 (file)
index 0000000..428c131
--- /dev/null
@@ -0,0 +1,53 @@
+From 864eb1afc60cb43e7df879b97f8ca0d719bbb735 Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <natechancellor@gmail.com>
+Date: Mon, 8 Oct 2018 12:57:36 +0200
+Subject: video: fbdev: sis: Remove unnecessary parentheses and commented code
+
+From: Nathan Chancellor <natechancellor@gmail.com>
+
+commit 864eb1afc60cb43e7df879b97f8ca0d719bbb735 upstream.
+
+Clang warns when multiple pairs of parentheses are used for a single
+conditional statement.
+
+drivers/video/fbdev/sis/init301.c:851:42: warning: equality comparison
+with extraneous parentheses [-Wparentheses-equality]
+      } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* ||
+                 ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
+drivers/video/fbdev/sis/init301.c:851:42: note: remove extraneous
+parentheses around the comparison to silence this warning
+      } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* ||
+                ~                        ^   ~
+drivers/video/fbdev/sis/init301.c:851:42: note: use '=' to turn this
+equality comparison into an assignment
+      } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* ||
+                                         ^~
+                                         =
+1 warning generated.
+
+Remove the parentheses and while we're at it, clean up the commented
+code, which has been here since the beginning of git history.
+
+Link: https://github.com/ClangBuiltLinux/linux/issues/118
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Cc: Thomas Winischhofer <thomas@winischhofer.net>
+Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/video/fbdev/sis/init301.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/video/fbdev/sis/init301.c
++++ b/drivers/video/fbdev/sis/init301.c
+@@ -848,9 +848,7 @@ SiS_PanelDelay(struct SiS_Private *SiS_P
+           SiS_DDC2Delay(SiS_Pr, 0x4000);
+        }
+-      } else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* ||
+-       (SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
+-       (SiS_Pr->SiS_CustomT == CUT_CLEVO1400) */ ) {                  /* 315 series, LVDS; Special */
++      } else if (SiS_Pr->SiS_IF_DEF_LVDS == 1) {                      /* 315 series, LVDS; Special */
+        if(SiS_Pr->SiS_IF_DEF_CH70xx == 0) {
+           PanelID = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36);
diff --git a/queue-4.19/x86-hyper-v-report-crash-register-data-or-kmsg-before-running-crash-kernel.patch b/queue-4.19/x86-hyper-v-report-crash-register-data-or-kmsg-before-running-crash-kernel.patch
new file mode 100644 (file)
index 0000000..ce53071
--- /dev/null
@@ -0,0 +1,45 @@
+From a11589563e96bf262767294b89b25a9d44e7303b Mon Sep 17 00:00:00 2001
+From: Tianyu Lan <Tianyu.Lan@microsoft.com>
+Date: Mon, 6 Apr 2020 08:53:29 -0700
+Subject: x86/Hyper-V: Report crash register data or kmsg before running crash kernel
+
+From: Tianyu Lan <Tianyu.Lan@microsoft.com>
+
+commit a11589563e96bf262767294b89b25a9d44e7303b upstream.
+
+We want to notify Hyper-V when a Linux guest VM crash occurs, so
+there is a record of the crash even when kdump is enabled.   But
+crash_kexec_post_notifiers defaults to "false", so the kdump kernel
+runs before the notifiers and Hyper-V never gets notified.  Fix this by
+always setting crash_kexec_post_notifiers to be true for Hyper-V VMs.
+
+Fixes: 81b18bce48af ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic")
+Reviewed-by: Michael Kelley <mikelley@microsoft.com>
+Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
+Link: https://lore.kernel.org/r/20200406155331.2105-5-Tianyu.Lan@microsoft.com
+Signed-off-by: Wei Liu <wei.liu@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/cpu/mshyperv.c |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/arch/x86/kernel/cpu/mshyperv.c
++++ b/arch/x86/kernel/cpu/mshyperv.c
+@@ -250,6 +250,16 @@ static void __init ms_hyperv_init_platfo
+                       cpuid_eax(HYPERV_CPUID_NESTED_FEATURES);
+       }
++      /*
++       * Hyper-V expects to get crash register data or kmsg when
++       * crash enlightment is available and system crashes. Set
++       * crash_kexec_post_notifiers to be true to make sure that
++       * calling crash enlightment interface before running kdump
++       * kernel.
++       */
++      if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE)
++              crash_kexec_post_notifiers = true;
++
+ #ifdef CONFIG_X86_LOCAL_APIC
+       if (ms_hyperv.features & HV_X64_ACCESS_FREQUENCY_MSRS &&
+           ms_hyperv.misc_features & HV_FEATURE_FREQUENCY_MSRS_AVAILABLE) {