linux-stable/drivers/pinctrl
Krzysztof Kozlowski e58ab834e4 pinctrl: qcom: lpass-lpi: fix concurrent register updates
[ Upstream commit c8befdc411 ]

The Qualcomm LPASS LPI pin controller driver uses one lock for guarding
Read-Modify-Write code for slew rate registers.  However the pin
configuration and muxing registers have exactly the same RMW code but
are not protected.

Pin controller framework does not provide locking here, thus it is
possible to trigger simultaneous change of pin configuration registers
resulting in non-atomic changes.

Protect from concurrent access by re-using the same lock used to cover
the slew rate register.  Using the same lock instead of adding second
one will make more sense, once we add support for newer Qualcomm SoC,
where slew rate is configured in the same register as pin
configuration/muxing.

Fixes: 6e261d1090 ("pinctrl: qcom: Add sm8250 lpass lpi pinctrl driver")
Cc: stable@vger.kernel.org
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231013145705.219954-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-02 09:35:22 +01:00
..
actions
aspeed pinctrl: aspeed: Revert "Force to disable the function's signal" 2023-02-14 19:11:50 +01:00
bcm pinctrl: bcm2835: Handle gpiochip_add_pin_range() errors 2023-07-19 16:21:34 +02:00
berlin pinctrl: berlin: fix spelling typo in comment 2022-09-05 14:10:14 +02:00
cirrus
freescale pinctrl: imx8m: kconfig: Fix build error on test compile 2022-09-08 10:06:57 +02:00
intel pinctrl: cherryview: fix address_space_handler() argument 2023-09-19 12:27:57 +02:00
mediatek pinctrl: mediatek: Initialize variable *buf to zero 2023-03-10 09:33:16 +01:00
meson pinctrl: meson-axg: add missing GPIOA_18 gpio group 2023-06-14 11:15:28 +02:00
mvebu pinctrl: armada-37xx: Remove unused macro PIN_GRP() 2022-08-22 10:46:25 +02:00
nomadik pinctrl: nomadik: remove dead code after DB8540 pinctrl removal 2022-09-19 09:35:57 +02:00
nuvoton pinctrl: nuvoton: wpcm450: fix out of bounds write 2023-10-19 23:08:52 +02:00
pxa
qcom pinctrl: qcom: lpass-lpi: fix concurrent register updates 2023-11-02 09:35:22 +01:00
ralink pinctrl: ralink: reintroduce ralink,rt2880-pinmux compatible string 2023-05-11 23:03:36 +09:00
renesas pinctrl: renesas: rzn1: Enable missing PINMUX 2023-10-19 23:08:54 +02:00
samsung pinctrl: samsung: Finish initializing the gpios before registering them 2022-08-16 12:23:30 +03:00
spear
sprd
starfive pinctrl: starfive: Rename "pinctrl-starfive" to "pinctrl-starfive-jh7100" 2022-10-04 10:47:48 +02:00
stm32 pinctrl: stm32: Fix refcount leak in stm32_pctrl_get_irq_domain 2023-03-10 09:33:11 +01:00
sunplus pinctrl:sunplus: Add check for kmalloc 2023-07-19 16:21:37 +02:00
sunxi These are the pin control changes for the v6.1 kernel cycle: 2022-10-11 10:59:59 -07:00
tegra
ti
uniphier
visconti
vt8500
core.c Revert "pinctrl: avoid unsafe code pattern in find_pinctrl()" 2023-10-25 12:03:13 +02:00
core.h
devicetree.c pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map 2022-11-10 12:26:18 +01:00
devicetree.h
Kconfig These are the pin control changes for the v6.1 kernel cycle: 2022-10-11 10:59:59 -07:00
Makefile pinctrl: Create subdirectory for StarFive drivers 2022-10-04 10:42:11 +02:00
pinconf-generic.c pinctrl: pinconf-generic: add missing of_node_put() 2022-12-31 13:32:16 +01:00
pinconf.c
pinconf.h
pinctrl-amd.c pinctrl: amd: Don't show Invalid config param errors 2023-09-06 21:27:03 +01:00
pinctrl-amd.h pinctrl: amd: Drop pull up select configuration 2023-07-23 13:49:31 +02:00
pinctrl-apple-gpio.c
pinctrl-artpec6.c
pinctrl-as3722.c
pinctrl-at91-pio4.c pinctrl: at91-pio4: check return value of devm_kasprintf() 2023-07-19 16:21:38 +02:00
pinctrl-at91.c pinctrl: at91: use devm_kasprintf() to avoid potential leaks 2023-03-10 09:33:59 +01:00
pinctrl-at91.h
pinctrl-axp209.c
pinctrl-bm1880.c
pinctrl-cy8c95x0.c pinctrl: cy8c95x0: Align function names in cy8c95x0_pmxops 2022-09-20 11:22:12 +02:00
pinctrl-da850-pupd.c
pinctrl-da9062.c
pinctrl-digicolor.c
pinctrl-equilibrium.c
pinctrl-equilibrium.h
pinctrl-falcon.c
pinctrl-gemini.c
pinctrl-ingenic.c pinctrl: Ingenic: JZ4755 bug fixes 2022-10-17 11:47:38 +02:00
pinctrl-k210.c pinctrl: k210: call of_node_put() 2022-12-31 13:32:14 +01:00
pinctrl-keembay.c
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-lpc18xx.c
pinctrl-max77620.c
pinctrl-mcp23s08.c pinctrl: mcp23s08: Drop assignment of default number of OF cells 2022-09-03 00:17:35 +02:00
pinctrl-mcp23s08.h
pinctrl-mcp23s08_i2c.c
pinctrl-mcp23s08_spi.c pinctrl: mcp23s08: check return value of devm_kasprintf() 2023-09-13 09:42:46 +02:00
pinctrl-microchip-sgpio.c pinctrl: microchip-sgpio: check return value of devm_kasprintf() 2023-07-19 16:21:38 +02:00
pinctrl-ocelot.c pinctrl: ocelot: Fix alt mode for ocelot 2023-04-06 12:10:49 +02:00
pinctrl-oxnas.c
pinctrl-palmas.c
pinctrl-pic32.c
pinctrl-pic32.h
pinctrl-pistachio.c pinctrl: pistachio: Correct the fwnode_irq_get() return value check 2022-09-08 15:18:58 +02:00
pinctrl-rk805.c
pinctrl-rockchip.c pinctrl: rockchip: Fix refcount leak in rockchip_pinctrl_parse_groups 2023-03-10 09:33:11 +01:00
pinctrl-rockchip.h pinctrl: rockchip: Add RV1126 pinctrl support 2022-08-22 09:51:08 +02:00
pinctrl-single.c pinctrl: single: fix potential NULL dereference 2023-02-14 19:11:50 +01:00
pinctrl-st.c pinctrl: st: stop abusing of_get_named_gpio() 2022-10-04 09:58:17 +02:00
pinctrl-stmfx.c
pinctrl-sx150x.c
pinctrl-tb10x.c
pinctrl-thunderbay.c pinctrl: thunderbay: fix possible memory leak in thunderbay_build_functions() 2022-12-31 13:32:23 +01:00
pinctrl-utils.c
pinctrl-utils.h
pinctrl-xway.c
pinctrl-zynq.c
pinctrl-zynqmp.c Revert "pinctrl: pinctrl-zynqmp: Add support for output-enable and bias-high-impedance" 2022-10-18 09:50:29 +02:00
pinmux.c
pinmux.h