linux-yocto/drivers/pinctrl
Bartosz Golaszewski cc145e02d6 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:32:08 +02:00
..
actions
aspeed
bcm pinctrl: bcm281xx: Use "unsigned int" instead of bare "unsigned" 2025-06-04 14:40:09 +02:00
berlin
cirrus
freescale pinctrl: freescale: fix COMPILE_TEST error with PINCTRL_IMX_SCU 2024-12-14 19:54:45 +01:00
intel pinctrl: meteorlake: Add Arrow Lake-H/U ACPI ID 2024-09-18 19:23:06 +02:00
mediatek pinctrl: mediatek: common-v2: Fix broken bias-disable for PULL_PU_PD_RSEL_TYPE 2024-09-04 13:25:00 +02:00
meson pinctrl: meson: define the pull up/down resistor value as 60 kOhm 2025-06-04 14:40:18 +02:00
mvebu pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get() 2025-06-27 11:07:34 +01:00
nomadik
nuvoton
pxa
qcom pinctrl: qcom: msm: mark certain pins as invalid for interrupts 2025-07-17 18:32:08 +02:00
ralink
renesas pinctrl: renesas: rza2: Fix potential NULL pointer dereference 2025-05-02 07:47:01 +02:00
samsung pinctrl: samsung: fix fwnode refcount cleanup if platform_get_irq_optional() fails 2025-02-21 13:49:53 +01:00
spear
sprd
starfive
stm32 pinctrl: stm32: fix array read out of bound 2025-02-21 13:49:28 +01:00
sunplus
sunxi
tegra pinctrl: tegra: Fix off by one in tegra_pinctrl_get_group() 2025-06-04 14:40:22 +02:00
ti pinctrl: ti: ti-iodelay: fix possible memory leak when pinctrl_enable() fails 2024-08-03 08:49:26 +02:00
uniphier
visconti
vt8500
core.c
core.h
devicetree.c pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map 2025-06-04 14:40:14 +02:00
devicetree.h
Kconfig
Makefile
pinconf-generic.c
pinconf.c
pinconf.h
pinctrl-amd.c
pinctrl-amd.h
pinctrl-apple-gpio.c pinctrl: apple: check devm_kasprintf() returned value 2024-10-22 15:56:50 +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-27 11:07:11 +01: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:49:56 +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 pinctrl: k210: Undef K210_PC_DEFAULT 2024-12-14 19:53:43 +01:00
pinctrl-keembay.c
pinctrl-lantiq.c
pinctrl-lantiq.h
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:07:35 +01:00
pinctrl-mcp23s08.h
pinctrl-microchip-sgpio.c
pinctrl-ocelot.c pinctrl: ocelot: fix system hang on level based interrupts 2024-10-22 15:56:50 +02:00
pinctrl-oxnas.c
pinctrl-palmas.c
pinctrl-pic32.c
pinctrl-pic32.h
pinctrl-pistachio.c
pinctrl-rk805.c
pinctrl-rockchip.c pinctrl: rockchip: correct RK3328 iomux width flag for GPIO2-B pins 2024-09-04 13:24:56 +02:00
pinctrl-rockchip.h
pinctrl-single.c pinctrl: single: fix missing error code in pcs_probe() 2024-10-17 15:21:05 +02:00
pinctrl-st.c
pinctrl-stmfx.c
pinctrl-sx150x.c
pinctrl-tb10x.c
pinctrl-thunderbay.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-14 19:53:35 +01:00
pinmux.c
pinmux.h