From: Greg Kroah-Hartman Date: Tue, 3 Dec 2024 09:52:10 +0000 (+0100) Subject: 6.12-stable patches X-Git-Tag: v4.19.325~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1c01d8d348635637b722f9e16233d13cc52535cd;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: platform-chrome-cros_ec_typec-fix-missing-fwnode-reference-decrement.patch --- 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 index 00000000000..0eeabae9f98 --- /dev/null +++ b/queue-6.12/platform-chrome-cros_ec_typec-fix-missing-fwnode-reference-decrement.patch @@ -0,0 +1,36 @@ +From 9c41f371457bd9a24874e3c7934d9745e87fbc58 Mon Sep 17 00:00:00 2001 +From: Javier Carrasco +Date: Sun, 13 Oct 2024 15:20:24 +0200 +Subject: platform/chrome: cros_ec_typec: fix missing fwnode reference decrement + +From: Javier Carrasco + +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 +Link: https://lore.kernel.org/r/20241013-cross_ec_typec_fwnode_handle_put-v2-1-9182b2cd7767@gmail.com +Signed-off-by: Tzung-Bi Shih +Signed-off-by: Greg Kroah-Hartman +--- + 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; + } diff --git a/queue-6.12/series b/queue-6.12/series index 6703394da0f..774bc739572 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -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