]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Aug 2024 13:54:28 +0000 (15:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Aug 2024 13:54:28 +0000 (15:54 +0200)
added patches:
hwmon-ltc2992-fix-memory-leak-in-ltc2992_parse_dt.patch
revert-drm-amd-display-validate-hw_points_num-before-using-it.patch
revert-usb-gadget-uvc-cleanup-request-when-not-in-correct-state.patch
tcp-do-not-export-tcp_twsk_purge.patch

queue-6.1/hwmon-ltc2992-fix-memory-leak-in-ltc2992_parse_dt.patch [new file with mode: 0644]
queue-6.1/revert-drm-amd-display-validate-hw_points_num-before-using-it.patch [new file with mode: 0644]
queue-6.1/revert-usb-gadget-uvc-cleanup-request-when-not-in-correct-state.patch [new file with mode: 0644]
queue-6.1/series
queue-6.1/tcp-do-not-export-tcp_twsk_purge.patch [new file with mode: 0644]

diff --git a/queue-6.1/hwmon-ltc2992-fix-memory-leak-in-ltc2992_parse_dt.patch b/queue-6.1/hwmon-ltc2992-fix-memory-leak-in-ltc2992_parse_dt.patch
new file mode 100644 (file)
index 0000000..4683903
--- /dev/null
@@ -0,0 +1,41 @@
+From a94ff8e50c20bde6d50864849a98b106e45d30c6 Mon Sep 17 00:00:00 2001
+From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+Date: Thu, 23 May 2024 17:47:14 +0200
+Subject: hwmon: (ltc2992) Fix memory leak in ltc2992_parse_dt()
+
+From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+
+commit a94ff8e50c20bde6d50864849a98b106e45d30c6 upstream.
+
+A new error path was added to the fwnode_for_each_available_node() loop
+in ltc2992_parse_dt(), which leads to an early return that requires a
+call to fwnode_handle_put() to avoid a memory leak in that case.
+
+Add the missing fwnode_handle_put() in the error path from a zero value
+shunt resistor.
+
+Cc: stable@vger.kernel.org
+Fixes: 10b029020487 ("hwmon: (ltc2992) Avoid division by zero")
+Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+Link: https://lore.kernel.org/r/20240523-fwnode_for_each_available_child_node_scoped-v2-1-701f3a03f2fb@gmail.com
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/hwmon/ltc2992.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/hwmon/ltc2992.c
++++ b/drivers/hwmon/ltc2992.c
+@@ -876,9 +876,11 @@ static int ltc2992_parse_dt(struct ltc29
+               ret = fwnode_property_read_u32(child, "shunt-resistor-micro-ohms", &val);
+               if (!ret) {
+-                      if (!val)
++                      if (!val) {
++                              fwnode_handle_put(child);
+                               return dev_err_probe(&st->client->dev, -EINVAL,
+                                                    "shunt resistor value cannot be zero\n");
++                      }
+                       st->r_sense_uohm[addr] = val;
+               }
+       }
diff --git a/queue-6.1/revert-drm-amd-display-validate-hw_points_num-before-using-it.patch b/queue-6.1/revert-drm-amd-display-validate-hw_points_num-before-using-it.patch
new file mode 100644 (file)
index 0000000..0403993
--- /dev/null
@@ -0,0 +1,34 @@
+From 8f4bdbc8e99db6ec9cb0520748e49a2f2d7d1727 Mon Sep 17 00:00:00 2001
+From: Alex Hung <alex.hung@amd.com>
+Date: Wed, 11 Oct 2023 13:18:38 -0600
+Subject: Revert "drm/amd/display: Validate hw_points_num before using it"
+
+From: Alex Hung <alex.hung@amd.com>
+
+commit 8f4bdbc8e99db6ec9cb0520748e49a2f2d7d1727 upstream.
+
+This reverts commit 58c3b3341cea4f75dc8c003b89f8a6dd8ec55e50.
+
+[WHY & HOW]
+The writeback series cause a regression in thunderbolt display.
+
+Signed-off-by: Alex Hung <alex.hung@amd.com>
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c |    3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c
++++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c
+@@ -243,9 +243,6 @@ static bool dwb3_program_ogam_lut(
+               return false;
+       }
+-      if (params->hw_points_num == 0)
+-              return false;
+-
+       REG_SET(DWB_OGAM_CONTROL, 0, DWB_OGAM_MODE, 2);
+       current_mode = dwb3_get_ogam_current(dwbc30);
diff --git a/queue-6.1/revert-usb-gadget-uvc-cleanup-request-when-not-in-correct-state.patch b/queue-6.1/revert-usb-gadget-uvc-cleanup-request-when-not-in-correct-state.patch
new file mode 100644 (file)
index 0000000..48e4a0e
--- /dev/null
@@ -0,0 +1,36 @@
+From dddc00f255415b826190cfbaa5d6dbc87cd9ded1 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Thu, 5 Oct 2023 10:51:04 +0200
+Subject: Revert "usb: gadget: uvc: cleanup request when not in correct state"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+commit dddc00f255415b826190cfbaa5d6dbc87cd9ded1 upstream.
+
+This reverts commit 52a39f2cf62bb5430ad1f54cd522dbfdab1d71ba.
+
+Based on review comments, it was applied too soon and needs more work.
+
+Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+Link: https://lore.kernel.org/r/20231005081716.GA13853@pendragon.ideasonboard.com
+Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/gadget/function/uvc_video.c |    6 ------
+ 1 file changed, 6 deletions(-)
+
+--- a/drivers/usb/gadget/function/uvc_video.c
++++ b/drivers/usb/gadget/function/uvc_video.c
+@@ -259,12 +259,6 @@ uvc_video_complete(struct usb_ep *ep, st
+       struct uvc_device *uvc = video->uvc;
+       unsigned long flags;
+-      if (uvc->state == UVC_STATE_CONNECTED) {
+-              usb_ep_free_request(video->ep, ureq->req);
+-              ureq->req = NULL;
+-              return;
+-      }
+-
+       switch (req->status) {
+       case 0:
+               break;
index 6c858a3dbd6f89023a22ab446192072849f4e80f..937d3118789492b53f9a827c0a1d77b54669fa53 100644 (file)
@@ -278,3 +278,7 @@ mptcp-pm-re-using-id-of-unused-removed-add_addr.patch
 mptcp-pm-re-using-id-of-unused-removed-subflows.patch
 mptcp-pm-re-using-id-of-unused-flushed-subflows.patch
 mptcp-pm-only-decrement-add_addr_accepted-for-mpj-req.patch
+revert-usb-gadget-uvc-cleanup-request-when-not-in-correct-state.patch
+revert-drm-amd-display-validate-hw_points_num-before-using-it.patch
+tcp-do-not-export-tcp_twsk_purge.patch
+hwmon-ltc2992-fix-memory-leak-in-ltc2992_parse_dt.patch
diff --git a/queue-6.1/tcp-do-not-export-tcp_twsk_purge.patch b/queue-6.1/tcp-do-not-export-tcp_twsk_purge.patch
new file mode 100644 (file)
index 0000000..e9f9ac6
--- /dev/null
@@ -0,0 +1,32 @@
+From c51db4ac10d57c366f9a92121e3889bfc6c324cd Mon Sep 17 00:00:00 2001
+From: Eric Dumazet <edumazet@google.com>
+Date: Fri, 19 Apr 2024 07:19:42 +0000
+Subject: tcp: do not export tcp_twsk_purge()
+
+From: Eric Dumazet <edumazet@google.com>
+
+commit c51db4ac10d57c366f9a92121e3889bfc6c324cd upstream.
+
+After commit 1eeb50435739 ("tcp/dccp: do not care about
+families in inet_twsk_purge()") tcp_twsk_purge() is
+no longer potentially called from a module.
+
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Cc: Kuniyuki Iwashima <kuniyu@amazon.com>
+Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv4/tcp_minisocks.c |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/net/ipv4/tcp_minisocks.c
++++ b/net/ipv4/tcp_minisocks.c
+@@ -362,7 +362,6 @@ void tcp_twsk_purge(struct list_head *ne
+               }
+       }
+ }
+-EXPORT_SYMBOL_GPL(tcp_twsk_purge);
+ /* Warning : This function is called without sk_listener being locked.
+  * Be sure to read socket fields once, as their value could change under us.