linux-stable/drivers/pinctrl
Maria Yu b872d80d84 pinctrl: avoid reload of p state in list iteration
commit 4198a9b571 upstream.

When in the list_for_each_entry iteration, reload of p->state->settings
with a local setting from old_state will turn the list iteration into an
infinite loop.

The typical symptom when the issue happens, will be a printk message like:

  "not freeing pin xx (xxx) as part of deactivating group xxx - it is
already used for some other setting".

This is a compiler-dependent problem, one instance occurred using Clang
version 10.0 on the arm64 architecture with linux version 4.19.

Fixes: 6e5e959dde ("pinctrl: API changes to support multiple states per device")
Signed-off-by: Maria Yu <quic_aiquny@quicinc.com>
Cc:  <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231115102824.23727-1-quic_aiquny@quicinc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-08 08:41:59 +01:00
..
aspeed pinctrl: aspeed: Fix confusing types in return value 2023-02-22 12:46:04 +01:00
bcm pinctrl: iproc-gpio: Fix incorrect pinconf configurations 2020-01-27 14:46:47 +01:00
berlin
freescale pinctrl: freescale: imx: Fix an error handling path in 'imx_pinctrl_probe()' 2020-06-25 15:41:56 +02:00
intel pinctrl: cherryview: Return correct value if pin in push-pull mode 2023-08-11 11:33:37 +02:00
mediatek pinctrl: mediatek: Fix missing of_node_put() in mtk_pctrl_init 2022-04-20 09:08:20 +02:00
meson pinctrl: meson-gxl: fix GPIOX sdio pins 2020-03-20 10:54:18 +01:00
mvebu pinctrl: mvebu: Fix irq_of_parse_and_map() return value 2022-06-14 16:53:51 +02:00
nomadik pinctrl: nomadik: Fix refcount leak in nmk_pinctrl_dt_subnode_to_map 2022-08-25 11:11:32 +02:00
pxa
qcom pinctrl: qcom: msm8916: Allow CAMSS GP clocks to be muxed 2022-08-25 11:11:32 +02:00
samsung pinctrl: samsung: drop pin banks references on error paths 2022-04-20 09:08:09 +02:00
sh-pfc pinctrl: sh-pfc: sh7269: Fix CAN function GPIOs 2020-02-28 16:36:02 +01:00
sirf
spear
sprd
stm32 pinctrl: stm32: consider the GPIO offset to expose all the GPIO lines 2021-12-29 12:17:35 +01:00
sunxi pinctrl: sunxi: a83t: Fix NAND function name for some pins 2022-07-12 16:27:29 +02:00
tegra
ti pinctl: ti: iodelay: fix error checking on pinctrl_count_index_with_args call 2020-01-17 19:45:48 +01:00
uniphier
vt8500
zte
Kconfig
Makefile
core.c pinctrl: avoid reload of p state in list iteration 2023-12-08 08:41:59 +01:00
core.h
devicetree.c pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map 2022-11-25 17:36:50 +01:00
devicetree.h
pinconf-generic.c pinctrl: pinconf-generic: add missing of_node_put() 2023-01-18 09:26:14 +01:00
pinconf.c
pinconf.h
pinctrl-adi2-bf54x.c
pinctrl-adi2-bf60x.c
pinctrl-adi2.c
pinctrl-adi2.h
pinctrl-amd.c pinctrl: amd: Don't show `Invalid config param` errors 2023-09-23 10:46:52 +02:00
pinctrl-amd.h pinctrl: amd: fix npins for uart0 in kerncz_groups 2020-07-29 07:42:51 +02:00
pinctrl-artpec6.c
pinctrl-as3722.c
pinctrl-at91-pio4.c pinctrl: at91-pio4: check return value of devm_kasprintf() 2023-08-11 11:33:38 +02:00
pinctrl-at91.c pinctrl: at91: use devm_kasprintf() to avoid potential leaks 2023-03-11 16:26:43 +01:00
pinctrl-at91.h
pinctrl-coh901.c
pinctrl-coh901.h
pinctrl-da850-pupd.c
pinctrl-digicolor.c
pinctrl-falcon.c pinctrl: falcon: add missing put_device() call in pinctrl_falcon_probe() 2020-12-29 13:46:58 +01:00
pinctrl-gemini.c pinctrl: gemini: Fix up TVC clock group 2019-11-24 08:23:31 +01:00
pinctrl-ingenic.c pinctrl: ingenic: Probe driver at subsys_initcall 2019-11-20 17:59:43 +01:00
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-lpc18xx.c pinctrl: lpc18xx: Use define directive for PIN_CONFIG_GPIO_PIN_INT 2019-12-01 09:14:13 +01:00
pinctrl-max77620.c
pinctrl-mcp23s08.c pinctrl: mcp23s08: Fix mcp23x17 precious range 2020-10-29 09:07:05 +01:00
pinctrl-oxnas.c
pinctrl-palmas.c
pinctrl-pic32.c
pinctrl-pic32.h
pinctrl-pistachio.c pinctrl: pistachio: fix use of irq_of_parse_and_map() 2022-05-12 12:17:07 +02:00
pinctrl-rk805.c
pinctrl-rockchip.c pinctrl: rockchip: Fix refcount leak in rockchip_pinctrl_parse_groups 2023-03-11 16:26:38 +01:00
pinctrl-rza1.c
pinctrl-single.c pinctrl: single: fix potential NULL dereference 2023-02-22 12:46:04 +01:00
pinctrl-st.c
pinctrl-sx150x.c
pinctrl-tb10x.c
pinctrl-tz1090-pdc.c
pinctrl-tz1090.c
pinctrl-u300.c
pinctrl-utils.c
pinctrl-utils.h
pinctrl-xway.c pinctrl: xway: fix gpio-hog related boot issues 2019-12-05 15:37:27 +01:00
pinctrl-zynq.c pinctrl: zynq: Use define directive for PIN_CONFIG_IO_STANDARD 2019-12-01 09:14:13 +01:00
pinmux.c
pinmux.h