]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Mar 2023 09:10:27 +0000 (10:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Mar 2023 09:10:27 +0000 (10:10 +0100)
added patches:
arm64-dts-qcom-ipq8074-fix-gen2-pcie-qmp-phy.patch
iommu-vt-d-fix-an-unbalanced-rcu_read_lock-rcu_read_unlock.patch
media-uvcvideo-fix-memory-leak-of-object-map-on-error-exit-path.patch
wifi-ath9k-use-proper-statements-in-conditionals.patch

queue-5.15/arm64-dts-qcom-ipq8074-fix-gen2-pcie-qmp-phy.patch [new file with mode: 0644]
queue-5.15/iommu-vt-d-fix-an-unbalanced-rcu_read_lock-rcu_read_unlock.patch [new file with mode: 0644]
queue-5.15/media-uvcvideo-fix-memory-leak-of-object-map-on-error-exit-path.patch [new file with mode: 0644]
queue-5.15/series
queue-5.15/wifi-ath9k-use-proper-statements-in-conditionals.patch [new file with mode: 0644]

diff --git a/queue-5.15/arm64-dts-qcom-ipq8074-fix-gen2-pcie-qmp-phy.patch b/queue-5.15/arm64-dts-qcom-ipq8074-fix-gen2-pcie-qmp-phy.patch
new file mode 100644 (file)
index 0000000..4f1e750
--- /dev/null
@@ -0,0 +1,35 @@
+From 100d9c94ccf15b02742c326cd04f422ab729153b Mon Sep 17 00:00:00 2001
+From: Robert Marko <robimarko@gmail.com>
+Date: Fri, 13 Jan 2023 17:44:41 +0100
+Subject: arm64: dts: qcom: ipq8074: fix Gen2 PCIe QMP PHY
+
+From: Robert Marko <robimarko@gmail.com>
+
+commit 100d9c94ccf15b02742c326cd04f422ab729153b upstream.
+
+Serdes register space sizes are incorrect, update them to match the
+actual sizes from downstream QCA 5.4 kernel.
+
+Fixes: 942bcd33ed45 ("arm64: dts: qcom: Fix IPQ8074 PCIe PHY nodes")
+Signed-off-by: Robert Marko <robimarko@gmail.com>
+Signed-off-by: Bjorn Andersson <andersson@kernel.org>
+Link: https://lore.kernel.org/r/20230113164449.906002-1-robimarko@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/qcom/ipq8074.dtsi |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
++++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+@@ -220,9 +220,9 @@
+                       status = "disabled";
+                       pcie_phy1: phy@8e200 {
+-                              reg = <0x8e200 0x16c>,
++                              reg = <0x8e200 0x130>,
+                                     <0x8e400 0x200>,
+-                                    <0x8e800 0x4f4>;
++                                    <0x8e800 0x1f8>;
+                               #phy-cells = <0>;
+                               #clock-cells = <0>;
+                               clocks = <&gcc GCC_PCIE1_PIPE_CLK>;
diff --git a/queue-5.15/iommu-vt-d-fix-an-unbalanced-rcu_read_lock-rcu_read_unlock.patch b/queue-5.15/iommu-vt-d-fix-an-unbalanced-rcu_read_lock-rcu_read_unlock.patch
new file mode 100644 (file)
index 0000000..f0e7394
--- /dev/null
@@ -0,0 +1,48 @@
+From 4e5973dd2725bb30c3db622f7d73f7a5864ce718 Mon Sep 17 00:00:00 2001
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Date: Fri, 26 Nov 2021 21:55:55 +0800
+Subject: iommu/vt-d: Fix an unbalanced rcu_read_lock/rcu_read_unlock()
+
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+
+commit 4e5973dd2725bb30c3db622f7d73f7a5864ce718 upstream.
+
+If we return -EOPNOTSUPP, the rcu lock remains lock. This is spurious.
+Go through the end of the function instead. This way, the missing
+'rcu_read_unlock()' is called.
+
+Fixes: 7afd7f6aa21a ("iommu/vt-d: Check FL and SL capability sanity in scalable mode")
+Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Link: https://lore.kernel.org/r/40cc077ca5f543614eab2a10e84d29dd190273f6.1636217517.git.christophe.jaillet@wanadoo.fr
+Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
+Link: https://lore.kernel.org/r/20211126135556.397932-2-baolu.lu@linux.intel.com
+Signed-off-by: Joerg Roedel <jroedel@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/iommu/intel/cap_audit.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/iommu/intel/cap_audit.c
++++ b/drivers/iommu/intel/cap_audit.c
+@@ -144,6 +144,7 @@ static int cap_audit_static(struct intel
+ {
+       struct dmar_drhd_unit *d;
+       struct intel_iommu *i;
++      int rc = 0;
+       rcu_read_lock();
+       if (list_empty(&dmar_drhd_units))
+@@ -169,11 +170,11 @@ static int cap_audit_static(struct intel
+        */
+       if (intel_cap_smts_sanity() &&
+           !intel_cap_flts_sanity() && !intel_cap_slts_sanity())
+-              return -EOPNOTSUPP;
++              rc = -EOPNOTSUPP;
+ out:
+       rcu_read_unlock();
+-      return 0;
++      return rc;
+ }
+ int intel_cap_audit(enum cap_audit_type type, struct intel_iommu *iommu)
diff --git a/queue-5.15/media-uvcvideo-fix-memory-leak-of-object-map-on-error-exit-path.patch b/queue-5.15/media-uvcvideo-fix-memory-leak-of-object-map-on-error-exit-path.patch
new file mode 100644 (file)
index 0000000..faeeb49
--- /dev/null
@@ -0,0 +1,41 @@
+From 4b065060555b14c7a9b86c013a1c9bee8e8b6fbd Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.king@canonical.com>
+Date: Fri, 17 Sep 2021 13:49:30 +0200
+Subject: media: uvcvideo: Fix memory leak of object map on error exit path
+
+From: Colin Ian King <colin.king@canonical.com>
+
+commit 4b065060555b14c7a9b86c013a1c9bee8e8b6fbd upstream.
+
+Currently when the allocation of map->name fails the error exit path
+does not kfree the previously allocated object map. Fix this by
+setting ret to -ENOMEM and taking the free_map exit error path to
+ensure map is kfree'd.
+
+Addresses-Coverity: ("Resource leak")
+
+Fixes: 70fa906d6fce ("media: uvcvideo: Use control names from framework")
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
+Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/usb/uvc/uvc_v4l2.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/usb/uvc/uvc_v4l2.c
++++ b/drivers/media/usb/uvc/uvc_v4l2.c
+@@ -44,8 +44,10 @@ static int uvc_ioctl_ctrl_map(struct uvc
+       if (v4l2_ctrl_get_name(map->id) == NULL) {
+               map->name = kmemdup(xmap->name, sizeof(xmap->name),
+                                   GFP_KERNEL);
+-              if (!map->name)
+-                      return -ENOMEM;
++              if (!map->name) {
++                      ret = -ENOMEM;
++                      goto free_map;
++              }
+       }
+       memcpy(map->entity, xmap->entity, sizeof(map->entity));
+       map->selector = xmap->selector;
index 1c87c788f423c5e94445ef906a89b1681b62b8f1..94cc4b5d9f46164e67952dd2cf48a790031bcf65 100644 (file)
@@ -564,3 +564,7 @@ drm-i915-don-t-use-bar-mappings-for-ring-buffers-with-llc.patch
 drm-edid-fix-avi-infoframe-aspect-ratio-handling.patch
 perf-intel-pt-pkt-decoder-add-cfe-and-evd-packets.patch
 qede-avoid-uninitialized-entries-in-coal_entry-array.patch
+media-uvcvideo-fix-memory-leak-of-object-map-on-error-exit-path.patch
+iommu-vt-d-fix-an-unbalanced-rcu_read_lock-rcu_read_unlock.patch
+arm64-dts-qcom-ipq8074-fix-gen2-pcie-qmp-phy.patch
+wifi-ath9k-use-proper-statements-in-conditionals.patch
diff --git a/queue-5.15/wifi-ath9k-use-proper-statements-in-conditionals.patch b/queue-5.15/wifi-ath9k-use-proper-statements-in-conditionals.patch
new file mode 100644 (file)
index 0000000..a299ee7
--- /dev/null
@@ -0,0 +1,63 @@
+From b7dc753fe33a707379e2254317794a4dad6c0fe2 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Thu, 15 Dec 2022 17:55:42 +0100
+Subject: wifi: ath9k: use proper statements in conditionals
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit b7dc753fe33a707379e2254317794a4dad6c0fe2 upstream.
+
+A previous cleanup patch accidentally broke some conditional
+expressions by replacing the safe "do {} while (0)" constructs
+with empty macros. gcc points this out when extra warnings
+are enabled:
+
+drivers/net/wireless/ath/ath9k/hif_usb.c: In function 'ath9k_skb_queue_complete':
+drivers/net/wireless/ath/ath9k/hif_usb.c:251:57: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
+  251 |                         TX_STAT_INC(hif_dev, skb_failed);
+
+Make both sets of macros proper expressions again.
+
+Fixes: d7fc76039b74 ("ath9k: htc: clean up statistics macros")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
+Signed-off-by: Kalle Valo <kvalo@kernel.org>
+Link: https://lore.kernel.org/r/20221215165553.1950307-1-arnd@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/wireless/ath/ath9k/htc.h |   14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath9k/htc.h
++++ b/drivers/net/wireless/ath/ath9k/htc.h
+@@ -327,9 +327,9 @@ static inline struct ath9k_htc_tx_ctl *H
+ }
+ #ifdef CONFIG_ATH9K_HTC_DEBUGFS
+-#define __STAT_SAFE(hif_dev, expr)    ((hif_dev)->htc_handle->drv_priv ? (expr) : 0)
+-#define CAB_STAT_INC(priv)            ((priv)->debug.tx_stats.cab_queued++)
+-#define TX_QSTAT_INC(priv, q)         ((priv)->debug.tx_stats.queue_stats[q]++)
++#define __STAT_SAFE(hif_dev, expr)    do { ((hif_dev)->htc_handle->drv_priv ? (expr) : 0); } while (0)
++#define CAB_STAT_INC(priv)            do { ((priv)->debug.tx_stats.cab_queued++); } while (0)
++#define TX_QSTAT_INC(priv, q)         do { ((priv)->debug.tx_stats.queue_stats[q]++); } while (0)
+ #define TX_STAT_INC(hif_dev, c) \
+               __STAT_SAFE((hif_dev), (hif_dev)->htc_handle->drv_priv->debug.tx_stats.c++)
+@@ -378,10 +378,10 @@ void ath9k_htc_get_et_stats(struct ieee8
+                           struct ethtool_stats *stats, u64 *data);
+ #else
+-#define TX_STAT_INC(hif_dev, c)
+-#define TX_STAT_ADD(hif_dev, c, a)
+-#define RX_STAT_INC(hif_dev, c)
+-#define RX_STAT_ADD(hif_dev, c, a)
++#define TX_STAT_INC(hif_dev, c)               do { } while (0)
++#define TX_STAT_ADD(hif_dev, c, a)    do { } while (0)
++#define RX_STAT_INC(hif_dev, c)               do { } while (0)
++#define RX_STAT_ADD(hif_dev, c, a)    do { } while (0)
+ #define CAB_STAT_INC(priv)
+ #define TX_QSTAT_INC(priv, c)