<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/pinctrl/stm32, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-01-11T14:18:20+00:00</updated>
<entry>
<title>pinctrl: stm32: fix hwspinlock resource leak in probe function</title>
<updated>2026-01-11T14:18:20+00:00</updated>
<author>
<name>Haotian Zhang</name>
<email>vulab@iscas.ac.cn</email>
</author>
<published>2025-10-29T01:42:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a179fb07d053fb478a1abf0540249ba7178f04ee'/>
<id>urn:sha1:a179fb07d053fb478a1abf0540249ba7178f04ee</id>
<content type='text'>
[ Upstream commit 002679f79ed605e543fbace465557317cd307c9a ]

In stm32_pctl_probe(), hwspin_lock_request_specific() is called to
request a hwspinlock, but the acquired lock is not freed on multiple
error paths after this call. This causes resource leakage when the
function fails to initialize properly.

Use devm_hwspin_lock_request_specific() instead of
hwspin_lock_request_specific() to automatically manage the hwspinlock
resource lifecycle.

Fixes: 97cfb6cd34f2 ("pinctrl: stm32: protect configuration registers with a hwspinlock")
Signed-off-by: Haotian Zhang &lt;vulab@iscas.ac.cn&gt;
Reviewed-by: Antonio Borneo &lt;antonio.borneo@foss.st.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: Manage irq affinity settings</title>
<updated>2025-08-28T14:26:00+00:00</updated>
<author>
<name>Cheick Traore</name>
<email>cheick.traore@foss.st.com</email>
</author>
<published>2025-06-10T14:30:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=02696d807b569b72106c9e82169f3e81a4635c36'/>
<id>urn:sha1:02696d807b569b72106c9e82169f3e81a4635c36</id>
<content type='text'>
[ Upstream commit 4c5cc2f65386e22166ce006efe515c667aa075e4 ]

Trying to set the affinity of the interrupts associated to stm32
pinctrl results in a write error.

Fill struct irq_chip::irq_set_affinity to use the default helper
function.

Signed-off-by: Cheick Traore &lt;cheick.traore@foss.st.com&gt;
Signed-off-by: Antonio Borneo &lt;antonio.borneo@foss.st.com&gt;
Link: https://lore.kernel.org/20250610143042.295376-3-antonio.borneo@foss.st.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: fix array read out of bound</title>
<updated>2025-02-21T12:49:28+00:00</updated>
<author>
<name>Antonio Borneo</name>
<email>antonio.borneo@foss.st.com</email>
</author>
<published>2023-11-07T11:05:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e382b6946d03c62d58d2a6babedabc63d0ecc509'/>
<id>urn:sha1:e382b6946d03c62d58d2a6babedabc63d0ecc509</id>
<content type='text'>
commit edd48fd9d45370d6c8ba0dd834fcc51ff688cc87 upstream.

The existing code does not verify if the "tentative" index exceeds
the size of the array, causing out of bound read.
Issue identified with kasan.

Check the index before using it.

Signed-off-by: Antonio Borneo &lt;antonio.borneo@foss.st.com&gt;
Fixes: 32c170ff15b0 ("pinctrl: stm32: set default gpio line names using pin names")
Link: https://lore.kernel.org/r/20231107110520.4449-1-antonio.borneo@foss.st.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: Add check for clk_enable()</title>
<updated>2025-02-21T12:49:08+00:00</updated>
<author>
<name>Mingwei Zheng</name>
<email>zmw12306@gmail.com</email>
</author>
<published>2025-01-06T22:06:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=db7b15a67f4748eb98354a4eaf42013d0af71971'/>
<id>urn:sha1:db7b15a67f4748eb98354a4eaf42013d0af71971</id>
<content type='text'>
[ Upstream commit 451bc9aea9a1a6fe53969e81a5cb1bd785c0d989 ]

Convert the driver to clk_bulk*() API.
Add check for the return value of clk_bulk_enable() to catch
the potential error.

Fixes: 05d8af449d93 ("pinctrl: stm32: Keep pinctrl block clock enabled when LEVEL IRQ requested")
Signed-off-by: Mingwei Zheng &lt;zmw12306@gmail.com&gt;
Signed-off-by: Jiasheng Jiang &lt;jiashengjiangcool@gmail.com&gt;
Reviewed-by: Antonio Borneo &lt;antonio.borneo@foss.st.com&gt;
Link: https://lore.kernel.org/20250106220659.2640365-1-zmw12306@gmail.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: check devm_kasprintf() returned value</title>
<updated>2025-02-21T12:49:08+00:00</updated>
<author>
<name>Ma Ke</name>
<email>make24@iscas.ac.cn</email>
</author>
<published>2024-09-06T10:03:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a8d52de0a6c6b091b2771bcb98ce408cf9d69fe3'/>
<id>urn:sha1:a8d52de0a6c6b091b2771bcb98ce408cf9d69fe3</id>
<content type='text'>
[ Upstream commit b0f0e3f0552a566def55c844b0d44250c58e4df6 ]

devm_kasprintf() can return a NULL pointer on failure but this returned
value is not checked. Fix this lack and check the returned value.

Found by code review.

Cc: stable@vger.kernel.org
Fixes: 32c170ff15b0 ("pinctrl: stm32: set default gpio line names using pin names")
Signed-off-by: Ma Ke &lt;make24@iscas.ac.cn&gt;
Link: https://lore.kernel.org/20240906100326.624445-1-make24@iscas.ac.cn
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Stable-dep-of: 451bc9aea9a1 ("pinctrl: stm32: Add check for clk_enable()")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: Add check for devm_kcalloc</title>
<updated>2025-02-21T12:49:08+00:00</updated>
<author>
<name>Chen Ni</name>
<email>nichen@iscas.ac.cn</email>
</author>
<published>2023-10-31T08:08:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a1cfd1456639a8c41e8436ff3bafeeb806792e5'/>
<id>urn:sha1:1a1cfd1456639a8c41e8436ff3bafeeb806792e5</id>
<content type='text'>
[ Upstream commit b0eeba527e704d6023a6cd9103f929226e326b03 ]

Add check for the return value of devm_kcalloc() and return the error
if it fails in order to avoid NULL pointer dereference.

Fixes: 32c170ff15b0 ("pinctrl: stm32: set default gpio line names using pin names")
Signed-off-by: Chen Ni &lt;nichen@iscas.ac.cn&gt;
Acked-by: Valentin Caron &lt;valentin.caron@foss.st.com&gt;
Link: https://lore.kernel.org/r/20231031080807.3600656-1-nichen@iscas.ac.cn
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Stable-dep-of: 451bc9aea9a1 ("pinctrl: stm32: Add check for clk_enable()")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: set default gpio line names using pin names</title>
<updated>2025-02-21T12:49:08+00:00</updated>
<author>
<name>Valentin Caron</name>
<email>valentin.caron@foss.st.com</email>
</author>
<published>2023-06-20T10:43:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=75285cb2b49a9bfe15fc22aecab45ef25d50e6f2'/>
<id>urn:sha1:75285cb2b49a9bfe15fc22aecab45ef25d50e6f2</id>
<content type='text'>
[ Upstream commit 32c170ff15b044579b1f8b8cdabf543406dde9da ]

Add stm32_pctrl_get_desc_pin_from_gpio function to find a stm32 pin
descriptor which is matching with a gpio.
Most of the time pin number is equal to pin index in array. So the first
part of the function is useful to speed up.

And during gpio bank register, we set default gpio names with pin names.

Signed-off-by: Valentin Caron &lt;valentin.caron@foss.st.com&gt;
Acked-by: Alexandre TORGUE &lt;alexandre.torgue@foss.st.com&gt;
Link: https://lore.kernel.org/r/20230620104349.834687-1-valentin.caron@foss.st.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Stable-dep-of: 451bc9aea9a1 ("pinctrl: stm32: Add check for clk_enable()")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: Fix refcount leak in stm32_pctrl_get_irq_domain</title>
<updated>2023-03-10T08:33:11+00:00</updated>
<author>
<name>Miaoqian Lin</name>
<email>linmq006@gmail.com</email>
</author>
<published>2023-01-02T08:24:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=601be03fa8b81747a154bdef9b559411a5b921e8'/>
<id>urn:sha1:601be03fa8b81747a154bdef9b559411a5b921e8</id>
<content type='text'>
[ Upstream commit dcef18c8ac40aa85bb339f64c1dd31dd458b06fb ]

of_irq_find_parent() returns a node pointer with refcount incremented,
We should use of_node_put() on it when not needed anymore.
Add missing of_node_put() to avoid refcount leak.

Fixes: d86f4d71e42a ("pinctrl: stm32: check irq controller availability at probe")
Signed-off-by: Miaoqian Lin &lt;linmq006@gmail.com&gt;
Link: https://lore.kernel.org/r/20230102082503.3944927-1-linmq006@gmail.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: Switch to use dev_err_probe() helper</title>
<updated>2022-09-20T09:16:42+00:00</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-09-17T12:20:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=790cf9e3da3f16d65d389d714f6e18f27cf18704'/>
<id>urn:sha1:790cf9e3da3f16d65d389d714f6e18f27cf18704</id>
<content type='text'>
In the probe path, dev_err() can be replace with dev_err_probe()
which will check if error code is -EPROBE_DEFER and prints the
error name.

Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Link: https://lore.kernel.org/r/20220917122015.1893880-1-yangyingliang@huawei.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: stm32: fix optional IRQ support to gpios</title>
<updated>2022-06-28T14:12:40+00:00</updated>
<author>
<name>Fabien Dessenne</name>
<email>fabien.dessenne@foss.st.com</email>
</author>
<published>2022-06-27T14:23:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a1d4ef1adf8bbd302067534ead671a94759687ed'/>
<id>urn:sha1:a1d4ef1adf8bbd302067534ead671a94759687ed</id>
<content type='text'>
To act as an interrupt controller, a gpio bank relies on the
"interrupt-parent" of the pin controller.
When this optional "interrupt-parent" misses, do not create any IRQ domain.

This fixes a "NULL pointer in stm32_gpio_domain_alloc()" kernel crash when
the interrupt-parent = &lt;exti&gt; property is not declared in the Device Tree.

Fixes: 0eb9f683336d ("pinctrl: Add IRQ support to STM32 gpios")
Signed-off-by: Fabien Dessenne &lt;fabien.dessenne@foss.st.com&gt;
Link: https://lore.kernel.org/r/20220627142350.742973-1-fabien.dessenne@foss.st.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
