]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Mar 2026 09:09:18 +0000 (10:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Mar 2026 09:09:18 +0000 (10:09 +0100)
added patches:
i2c-fsi-fix-a-potential-leak-in-fsi_i2c_probe.patch

queue-5.10/i2c-fsi-fix-a-potential-leak-in-fsi_i2c_probe.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/i2c-fsi-fix-a-potential-leak-in-fsi_i2c_probe.patch b/queue-5.10/i2c-fsi-fix-a-potential-leak-in-fsi_i2c_probe.patch
new file mode 100644 (file)
index 0000000..b0aa685
--- /dev/null
@@ -0,0 +1,36 @@
+From be627abcc0d5dbd5882873bd85fbc18aa3d189ed Mon Sep 17 00:00:00 2001
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Date: Sun, 1 Mar 2026 17:21:01 +0100
+Subject: i2c: fsi: Fix a potential leak in fsi_i2c_probe()
+
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+
+commit be627abcc0d5dbd5882873bd85fbc18aa3d189ed upstream.
+
+In the commit in Fixes:, when the code has been updated to use an explicit
+for loop, instead of for_each_available_child_of_node(), the assumption
+that a reference to a device_node structure would be released at each
+iteration has been broken.
+
+Now, an explicit of_node_put() is needed to release the reference.
+
+Fixes: 095561f476ab ("i2c: fsi: Create busses for all ports")
+Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Cc: <stable@vger.kernel.org> # v5.3+
+Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
+Link: https://lore.kernel.org/r/fd805c39f8de51edf303856103d782138a1633c8.1772382022.git.christophe.jaillet@wanadoo.fr
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/i2c/busses/i2c-fsi.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/i2c/busses/i2c-fsi.c
++++ b/drivers/i2c/busses/i2c-fsi.c
+@@ -728,6 +728,7 @@ static int fsi_i2c_probe(struct device *
+               rc = i2c_add_adapter(&port->adapter);
+               if (rc < 0) {
+                       dev_err(dev, "Failed to register adapter: %d\n", rc);
++                      of_node_put(np);
+                       kfree(port);
+                       continue;
+               }
index a1e90267b49fdeb890437700700dbb4fb7fc205b..f67044d115011545c177c970ba521ee3dab0f2ae 100644 (file)
@@ -228,3 +228,4 @@ nfnetlink_osf-validate-individual-option-lengths-in-.patch
 net-dsa-bcm_sf2-fix-missing-clk_disable_unprepare-in.patch
 icmp-fix-null-pointer-dereference-in-icmp_tag_valida.patch
 hwmon-pmbus-isl68137-fix-unchecked-return-value-and-use-sysfs_emit.patch
+i2c-fsi-fix-a-potential-leak-in-fsi_i2c_probe.patch