]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2024 09:52:10 +0000 (10:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2024 09:52:10 +0000 (10:52 +0100)
added patches:
platform-chrome-cros_ec_typec-fix-missing-fwnode-reference-decrement.patch

queue-6.12/platform-chrome-cros_ec_typec-fix-missing-fwnode-reference-decrement.patch [new file with mode: 0644]
queue-6.12/series

diff --git a/queue-6.12/platform-chrome-cros_ec_typec-fix-missing-fwnode-reference-decrement.patch b/queue-6.12/platform-chrome-cros_ec_typec-fix-missing-fwnode-reference-decrement.patch
new file mode 100644 (file)
index 0000000..0eeabae
--- /dev/null
@@ -0,0 +1,36 @@
+From 9c41f371457bd9a24874e3c7934d9745e87fbc58 Mon Sep 17 00:00:00 2001
+From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+Date: Sun, 13 Oct 2024 15:20:24 +0200
+Subject: platform/chrome: cros_ec_typec: fix missing fwnode reference decrement
+
+From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+
+commit 9c41f371457bd9a24874e3c7934d9745e87fbc58 upstream.
+
+The device_for_each_child_node() macro requires explicit calls to
+fwnode_handle_put() upon early exits (return, break, goto) to decrement
+the fwnode's refcount, and avoid levaing a node reference behind.
+
+Add the missing fwnode_handle_put() after the common label for all error
+paths.
+
+Cc: stable@vger.kernel.org
+Fixes: fdc6b21e2444 ("platform/chrome: Add Type C connector class driver")
+Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+Link: https://lore.kernel.org/r/20241013-cross_ec_typec_fwnode_handle_put-v2-1-9182b2cd7767@gmail.com
+Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/chrome/cros_ec_typec.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/platform/chrome/cros_ec_typec.c
++++ b/drivers/platform/chrome/cros_ec_typec.c
+@@ -409,6 +409,7 @@ static int cros_typec_init_ports(struct
+       return 0;
+ unregister_ports:
++      fwnode_handle_put(fwnode);
+       cros_unregister_ports(typec);
+       return ret;
+ }
index 6703394da0fef9bf002c64d749e750b989fd2add..774bc739572631dbbe32ade1c8f1aad687d55f40 100644 (file)
@@ -702,3 +702,4 @@ risc-v-scalar-unaligned-access-emulated-on-hotplug-cpus.patch
 risc-v-check-scalar-unaligned-access-on-all-cpus.patch
 ksmbd-fix-use-after-free-in-smb-request-handling.patch
 smb-client-fix-null-ptr-deref-in-crypto_aead_setkey.patch
+platform-chrome-cros_ec_typec-fix-missing-fwnode-reference-decrement.patch