linux-yocto/drivers/pinctrl
Bartosz Golaszewski 1d57f71326 pinctrl: qcom: msm: mark certain pins as invalid for interrupts
commit 93712205ce upstream.

On some platforms, the UFS-reset pin has no interrupt logic in TLMM but
is nevertheless registered as a GPIO in the kernel. This enables the
user-space to trigger a BUG() in the pinctrl-msm driver by running, for
example: `gpiomon -c 0 113` on RB2.

The exact culprit is requesting pins whose intr_detection_width setting
is not 1 or 2 for interrupts. This hits a BUG() in
msm_gpio_irq_set_type(). Potentially crashing the kernel due to an
invalid request from user-space is not optimal, so let's go through the
pins and mark those that would fail the check as invalid for the irq chip
as we should not even register them as available irqs.

This function can be extended if we determine that there are more
corner-cases like this.

Fixes: f365be0925 ("pinctrl: Add Qualcomm TLMM driver")
Cc: stable@vger.kernel.org
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/20250612091448.41546-1-brgl@bgdev.pl
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-17 18:35:13 +02:00
..
actions
aspeed
bcm pinctrl: bcm281xx: Use "unsigned int" instead of bare "unsigned" 2025-06-04 14:42:02 +02:00
berlin
cirrus
freescale pinctrl: freescale: fix COMPILE_TEST error with PINCTRL_IMX_SCU 2024-12-14 20:00:10 +01:00
intel pinctrl: intel: Fix wrong bypass assignment in intel_pinctrl_probe_pwm() 2025-04-10 14:37:32 +02:00
mediatek
meson pinctrl: meson: define the pull up/down resistor value as 60 kOhm 2025-06-04 14:42:15 +02:00
mvebu pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get() 2025-06-27 11:08:54 +01:00
nomadik
nuvoton
nxp of: remove internal arguments from of_property_for_each_u32() 2025-02-08 09:51:51 +01:00
pxa
qcom pinctrl: qcom: msm: mark certain pins as invalid for interrupts 2025-07-17 18:35:13 +02:00
renesas pinctrl: renesas: rza2: Fix potential NULL pointer dereference 2025-05-02 07:50:52 +02:00
samsung pinctrl: samsung: fix fwnode refcount cleanup if platform_get_irq_optional() fails 2025-02-17 09:40:40 +01:00
spear
sprd
starfive
stm32 pinctrl: stm32: Add check for clk_enable() 2025-02-08 09:52:08 +01:00
sunplus
sunxi
tegra pinctrl: tegra: Fix off by one in tegra_pinctrl_get_group() 2025-06-04 14:42:21 +02:00
ti
uniphier
visconti
vt8500
core.c pinmux: Use sequential access to access desc->pinmux data 2024-12-14 20:00:11 +01:00
core.h pinmux: Use sequential access to access desc->pinmux data 2024-12-14 20:00:11 +01:00
devicetree.c pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map 2025-06-04 14:42:08 +02:00
devicetree.h
Kconfig
Makefile
pinconf-generic.c
pinconf.c
pinconf.h
pinctrl-amd.c pinctrl: amd: Clear GPIO debounce for suspend 2025-07-17 18:35:08 +02:00
pinctrl-amd.h pinctrl: amd: Take suspend type into consideration which pins are non-wake 2025-02-08 09:52:08 +01:00
pinctrl-apple-gpio.c pinctrl: apple: check devm_kasprintf() returned value 2024-10-22 15:46:34 +02:00
pinctrl-artpec6.c
pinctrl-as3722.c
pinctrl-at91-pio4.c
pinctrl-at91.c pinctrl: at91: Fix possible out-of-boundary access 2025-06-19 15:28:15 +02:00
pinctrl-at91.h
pinctrl-axp209.c
pinctrl-bm1880.c
pinctrl-cy8c95x0.c pinctrl: cy8c95x0: Respect IRQ trigger settings from firmware 2025-02-21 13:57:06 +01: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-k210.c of: remove internal arguments from of_property_for_each_u32() 2025-02-08 09:51:51 +01:00
pinctrl-keembay.c
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-loongson2.c
pinctrl-lpc18xx.c
pinctrl-max77620.c
pinctrl-mcp23s08_i2c.c
pinctrl-mcp23s08_spi.c
pinctrl-mcp23s08.c pinctrl: mcp23s08: Reset all pins to input at probe 2025-06-27 11:08:56 +01:00
pinctrl-mcp23s08.h
pinctrl-microchip-sgpio.c
pinctrl-mlxbf3.c
pinctrl-ocelot.c
pinctrl-palmas.c
pinctrl-pic32.c
pinctrl-pic32.h
pinctrl-pistachio.c
pinctrl-rk805.c
pinctrl-rockchip.c
pinctrl-rockchip.h
pinctrl-single.c
pinctrl-st.c
pinctrl-stmfx.c
pinctrl-sx150x.c
pinctrl-tb10x.c
pinctrl-utils.c
pinctrl-utils.h
pinctrl-xway.c
pinctrl-zynq.c
pinctrl-zynqmp.c pinctrl: zynqmp: drop excess struct member description 2024-12-09 10:32:13 +01:00
pinmux.c pinmux: Use sequential access to access desc->pinmux data 2024-12-14 20:00:11 +01:00
pinmux.h