]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Mar 2020 20:35:36 +0000 (21:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Mar 2020 20:35:36 +0000 (21:35 +0100)
added patches:
arm-dts-ls1021a-restore-mdio-compatible-to-gianfar.patch
asoc-topology-fix-memleak-in-soc_tplg_link_elems_load.patch

queue-4.14/arm-dts-ls1021a-restore-mdio-compatible-to-gianfar.patch [new file with mode: 0644]
queue-4.14/asoc-topology-fix-memleak-in-soc_tplg_link_elems_load.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/arm-dts-ls1021a-restore-mdio-compatible-to-gianfar.patch b/queue-4.14/arm-dts-ls1021a-restore-mdio-compatible-to-gianfar.patch
new file mode 100644 (file)
index 0000000..ac30395
--- /dev/null
@@ -0,0 +1,54 @@
+From 7155c44624d061692b4c13aa8343f119c67d4fc0 Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <olteanv@gmail.com>
+Date: Sun, 26 Jan 2020 21:49:50 +0200
+Subject: ARM: dts: ls1021a: Restore MDIO compatible to gianfar
+
+From: Vladimir Oltean <olteanv@gmail.com>
+
+commit 7155c44624d061692b4c13aa8343f119c67d4fc0 upstream.
+
+The difference between "fsl,etsec2-mdio" and "gianfar" has to do with
+the .get_tbipa function, which calculates the address of the TBIPA
+register automatically, if not explicitly specified. [ see
+drivers/net/ethernet/freescale/fsl_pq_mdio.c ]. On LS1021A, the TBIPA
+register is at offset 0x30 within the port register block, which is what
+the "gianfar" method of calculating addresses actually does.
+
+Luckily, the bad "compatible" is inconsequential for ls1021a.dtsi,
+because the TBIPA register is explicitly specified via the second "reg"
+(<0x0 0x2d10030 0x0 0x4>), so the "get_tbipa" function is dead code.
+Nonetheless it's good to restore it to its correct value.
+
+Background discussion:
+https://www.spinics.net/lists/stable/msg361156.html
+
+Fixes: c7861adbe37f ("ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect")
+Reported-by: Pavel Machek <pavel@denx.de>
+Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
+Signed-off-by: Shawn Guo <shawnguo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/ls1021a.dtsi |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/boot/dts/ls1021a.dtsi
++++ b/arch/arm/boot/dts/ls1021a.dtsi
+@@ -562,7 +562,7 @@
+               };
+               mdio0: mdio@2d24000 {
+-                      compatible = "fsl,etsec2-mdio";
++                      compatible = "gianfar";
+                       device_type = "mdio";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+@@ -570,7 +570,7 @@
+               };
+               mdio1: mdio@2d64000 {
+-                      compatible = "fsl,etsec2-mdio";
++                      compatible = "gianfar";
+                       device_type = "mdio";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
diff --git a/queue-4.14/asoc-topology-fix-memleak-in-soc_tplg_link_elems_load.patch b/queue-4.14/asoc-topology-fix-memleak-in-soc_tplg_link_elems_load.patch
new file mode 100644 (file)
index 0000000..ce3bd41
--- /dev/null
@@ -0,0 +1,39 @@
+From 2b2d5c4db732c027a14987cfccf767dac1b45170 Mon Sep 17 00:00:00 2001
+From: Dragos Tarcatu <dragos_tarcatu@mentor.com>
+Date: Fri, 7 Feb 2020 20:53:24 +0200
+Subject: ASoC: topology: Fix memleak in soc_tplg_link_elems_load()
+
+From: Dragos Tarcatu <dragos_tarcatu@mentor.com>
+
+commit 2b2d5c4db732c027a14987cfccf767dac1b45170 upstream.
+
+If soc_tplg_link_config() fails, _link needs to be freed in case of
+topology ABI version mismatch. However the current code is returning
+directly and ends up leaking memory in this case.
+This patch fixes that.
+
+Fixes: 593d9e52f9bb ("ASoC: topology: Add support to configure existing physical DAI links")
+Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
+Link: https://lore.kernel.org/r/20200207185325.22320-2-dragos_tarcatu@mentor.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/soc-topology.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/sound/soc/soc-topology.c
++++ b/sound/soc/soc-topology.c
+@@ -2177,8 +2177,11 @@ static int soc_tplg_link_elems_load(stru
+               }
+               ret = soc_tplg_link_config(tplg, _link);
+-              if (ret < 0)
++              if (ret < 0) {
++                      if (!abi_match)
++                              kfree(_link);
+                       return ret;
++              }
+               /* offset by version-specific struct size and
+                * real priv data size
index 8d8ecad1abe4919ea43c61e1ce9a5611a3a6683d..7d996be8c595796ddd960b56637bb97dcdb21fbd 100644 (file)
@@ -107,3 +107,5 @@ x86-pkeys-manually-set-x86_feature_ospke-to-preserve-existing-changes.patch
 dmaengine-tegra-apb-fix-use-after-free.patch
 dmaengine-tegra-apb-prevent-race-conditions-of-tasklet-vs-free-list.patch
 dm-cache-fix-a-crash-due-to-incorrect-work-item-cancelling.patch
+arm-dts-ls1021a-restore-mdio-compatible-to-gianfar.patch
+asoc-topology-fix-memleak-in-soc_tplg_link_elems_load.patch