]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Oct 2024 00:46:51 +0000 (01:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Oct 2024 00:46:51 +0000 (01:46 +0100)
added patches:
asoc-qcom-fix-null-dereference-in-asoc_qcom_lpass_cpu_platform_probe.patch
net-phy-dp83822-fix-reset-pin-definitions.patch

queue-5.15/asoc-qcom-fix-null-dereference-in-asoc_qcom_lpass_cpu_platform_probe.patch [new file with mode: 0644]
queue-5.15/net-phy-dp83822-fix-reset-pin-definitions.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/asoc-qcom-fix-null-dereference-in-asoc_qcom_lpass_cpu_platform_probe.patch b/queue-5.15/asoc-qcom-fix-null-dereference-in-asoc_qcom_lpass_cpu_platform_probe.patch
new file mode 100644 (file)
index 0000000..76351d1
--- /dev/null
@@ -0,0 +1,35 @@
+From 49da1463c9e3d2082276c3e0e2a8b65a88711cd2 Mon Sep 17 00:00:00 2001
+From: Zichen Xie <zichenxie0106@gmail.com>
+Date: Sun, 6 Oct 2024 15:57:37 -0500
+Subject: ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
+
+From: Zichen Xie <zichenxie0106@gmail.com>
+
+commit 49da1463c9e3d2082276c3e0e2a8b65a88711cd2 upstream.
+
+A devm_kzalloc() in asoc_qcom_lpass_cpu_platform_probe() could
+possibly return NULL pointer. NULL Pointer Dereference may be
+triggerred without addtional check.
+Add a NULL check for the returned pointer.
+
+Fixes: b5022a36d28f ("ASoC: qcom: lpass: Use regmap_field for i2sctl and dmactl registers")
+Cc: stable@vger.kernel.org
+Signed-off-by: Zichen Xie <zichenxie0106@gmail.com>
+Link: https://patch.msgid.link/20241006205737.8829-1-zichenxie0106@gmail.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/qcom/lpass-cpu.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/soc/qcom/lpass-cpu.c
++++ b/sound/soc/qcom/lpass-cpu.c
+@@ -975,6 +975,8 @@ int asoc_qcom_lpass_cpu_platform_probe(s
+       /* Allocation for i2sctl regmap fields */
+       drvdata->i2sctl = devm_kzalloc(&pdev->dev, sizeof(struct lpaif_i2sctl),
+                                       GFP_KERNEL);
++      if (!drvdata->i2sctl)
++              return -ENOMEM;
+       /* Initialize bitfields for dai I2SCTL register */
+       ret = lpass_cpu_init_i2sctl_bitfields(dev, drvdata->i2sctl,
diff --git a/queue-5.15/net-phy-dp83822-fix-reset-pin-definitions.patch b/queue-5.15/net-phy-dp83822-fix-reset-pin-definitions.patch
new file mode 100644 (file)
index 0000000..99ea7ed
--- /dev/null
@@ -0,0 +1,50 @@
+From de96f6a3003513c796bbe4e23210a446913f5c00 Mon Sep 17 00:00:00 2001
+From: Michel Alex <Alex.Michel@wiedemann-group.com>
+Date: Wed, 16 Oct 2024 12:11:15 +0000
+Subject: net: phy: dp83822: Fix reset pin definitions
+
+From: Michel Alex <Alex.Michel@wiedemann-group.com>
+
+commit de96f6a3003513c796bbe4e23210a446913f5c00 upstream.
+
+This change fixes a rare issue where the PHY fails to detect a link
+due to incorrect reset behavior.
+
+The SW_RESET definition was incorrectly assigned to bit 14, which is the
+Digital Restart bit according to the datasheet. This commit corrects
+SW_RESET to bit 15 and assigns DIG_RESTART to bit 14 as per the
+datasheet specifications.
+
+The SW_RESET define is only used in the phy_reset function, which fully
+re-initializes the PHY after the reset is performed. The change in the
+bit definitions should not have any negative impact on the functionality
+of the PHY.
+
+v2:
+- added Fixes tag
+- improved commit message
+
+Cc: stable@vger.kernel.org
+Fixes: 5dc39fd5ef35 ("net: phy: DP83822: Add ability to advertise Fiber connection")
+Signed-off-by: Alex Michel <alex.michel@wiedemann-group.com>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Message-ID: <AS1P250MB0608A798661549BF83C4B43EA9462@AS1P250MB0608.EURP250.PROD.OUTLOOK.COM>
+Signed-off-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/phy/dp83822.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/phy/dp83822.c
++++ b/drivers/net/phy/dp83822.c
+@@ -40,8 +40,8 @@
+ /* Control Register 2 bits */
+ #define DP83822_FX_ENABLE     BIT(14)
+-#define DP83822_HW_RESET      BIT(15)
+-#define DP83822_SW_RESET      BIT(14)
++#define DP83822_SW_RESET      BIT(15)
++#define DP83822_DIG_RESTART   BIT(14)
+ /* PHY STS bits */
+ #define DP83822_PHYSTS_DUPLEX                 BIT(2)
index 8316531cc6377314ba4fcc73ed5cb8a6f41864af..08d5481f0a761ca5cbf345e7627350d1723bae5d 100644 (file)
@@ -75,3 +75,5 @@ xfrm-fix-one-more-kernel-infoleak-in-algo-dumping.patch
 hv_netvsc-fix-vf-namespace-also-in-synthetic-nic-netdev_register-event.patch
 selinux-improve-error-checking-in-sel_write_load.patch
 serial-protect-uart_port_dtr_rts-in-uart_shutdown-to.patch
+net-phy-dp83822-fix-reset-pin-definitions.patch
+asoc-qcom-fix-null-dereference-in-asoc_qcom_lpass_cpu_platform_probe.patch