linux-yocto/drivers/pinctrl
Bartosz Golaszewski 275605a8b4 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:37:09 +02:00
..
actions
aspeed
bcm pinctrl: bcm281xx: Use "unsigned int" instead of bare "unsigned" 2025-05-29 11:02:30 +02:00
berlin
cirrus pinctrl: madera: Simplify with dev_err_probe() 2024-09-02 10:28:53 +02:00
freescale pinctrl: imx: Return NULL if no group is matched and found 2025-05-09 09:50:36 +02:00
intel pinctrl: intel: Fix wrong bypass assignment in intel_pinctrl_probe_pwm() 2025-04-10 14:39:21 +02:00
mediatek This is the bulk of pin control changes for the v6.12 kernel cycle: 2024-09-23 13:15:23 -07:00
meson pinctrl: meson: define the pull up/down resistor value as 60 kOhm 2025-05-29 11:03:09 +02:00
mvebu pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get() 2025-06-27 11:11:31 +01:00
nomadik pinctrl: nomadik: Add check for clk_enable() 2025-02-08 09:57:29 +01:00
nuvoton pinctrl: npcm8xx: Fix incorrect struct npcm8xx_pincfg assignment 2025-04-10 14:39:20 +02:00
nxp pinctrl: s32cc: add update and overwrite options when setting pinconf 2024-08-05 10:17:43 +02:00
pxa
qcom pinctrl: qcom: msm: mark certain pins as invalid for interrupts 2025-07-17 18:37:09 +02:00
realtek pinctrl: realtek: Constify struct regmap_config 2024-08-05 09:07:41 +02:00
renesas pinctrl: renesas: rzg2l: Add suspend/resume support for pull up/down 2025-05-29 11:02:51 +02:00
samsung pinctrl: samsung: add gs101 specific eint suspend/resume callbacks 2025-06-19 15:32:23 +02:00
sophgo pinctrl: sophgo: avoid to modify untouched bit when setting cv1800 pinconf 2025-05-29 11:02:35 +02:00
spear
sprd
starfive pinctrl: starfive: jh7110: Correct the level trigger configuration of iev register 2024-08-23 18:14:45 +02:00
stm32 pinctrl: stm32: Add check for clk_enable() 2025-02-08 09:57:33 +01:00
sunplus
sunxi pinctrl: sunxi: Use devm_clk_get_enabled() helpers 2024-09-02 10:06:13 +02:00
tegra pinctrl: tegra: Fix off by one in tegra_pinctrl_get_group() 2025-05-29 11:03:26 +02:00
ti pinctrl: ti: ti-iodelay: Constify struct ti_iodelay_reg_data 2024-08-05 09:22:33 +02:00
uniphier
visconti
vt8500
core.c pinmux: Use sequential access to access desc->pinmux data 2024-12-14 20:03:59 +01:00
core.h pinmux: Use sequential access to access desc->pinmux data 2024-12-14 20:03:59 +01:00
devicetree.c pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map 2025-05-29 11:02:48 +02:00
devicetree.h
Kconfig soc: convert ep93xx to devicetree 2024-09-26 12:00:25 -07:00
Makefile soc: convert ep93xx to devicetree 2024-09-26 12:00:25 -07:00
pinconf-generic.c pinctrl: pinconf-generic: Print unsigned value if a format is registered 2025-02-21 14:01:15 +01:00
pinconf.c
pinconf.h
pinctrl-amd.c pinctrl: amd: Clear GPIO debounce for suspend 2025-07-17 18:37:04 +02:00
pinctrl-amd.h pinctrl: amd: Take suspend type into consideration which pins are non-wake 2025-02-08 09:57:33 +01:00
pinctrl-apple-gpio.c pinctrl: apple: check devm_kasprintf() returned value 2024-10-01 14:03: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:31:49 +02:00
pinctrl-at91.h
pinctrl-aw9523.c pinctrl: aw9523: add missing mutex_destroy 2024-10-02 15:48:38 +02:00
pinctrl-axp209.c
pinctrl-bm1880.c
pinctrl-cy8c95x0.c pinctrl: cy8c95x0: Respect IRQ trigger settings from firmware 2025-02-21 14:01:14 +01:00
pinctrl-da850-pupd.c
pinctrl-da9062.c
pinctrl-digicolor.c
pinctrl-ep93xx.c pinctrl: ep93xx: Fix raster pins typo 2024-09-16 11:16:15 +00:00
pinctrl-equilibrium.c
pinctrl-equilibrium.h
pinctrl-eyeq5.c pinctrl: eyeq5: add platform driver 2024-08-04 00:51:28 +02:00
pinctrl-falcon.c
pinctrl-gemini.c
pinctrl-ingenic.c
pinctrl-k210.c pinctrl: k210: Undef K210_PC_DEFAULT 2024-12-05 14:02:16 +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:11:34 +01:00
pinctrl-mcp23s08.h
pinctrl-microchip-sgpio.c
pinctrl-mlxbf3.c
pinctrl-ocelot.c pinctrl: ocelot: fix system hang on level based interrupts 2024-10-12 22:04:38 +02:00
pinctrl-palmas.c
pinctrl-pef2256.c
pinctrl-pic32.c
pinctrl-pic32.h
pinctrl-pistachio.c
pinctrl-rk805.c
pinctrl-rockchip.c This is the bulk of pin control changes for the v6.12 kernel cycle: 2024-09-23 13:15:23 -07:00
pinctrl-rockchip.h pinctrl: rockchip: Add rk3576 pinctrl support 2024-08-23 17:47:17 +02:00
pinctrl-scmi.c
pinctrl-single.c This is the bulk of pin control changes for the v6.12 kernel cycle: 2024-09-23 13:15:23 -07:00
pinctrl-st.c
pinctrl-stmfx.c pinctrl: stmfx: Use string_choices API instead of ternary operator 2024-08-31 00:11:29 +02:00
pinctrl-sx150x.c
pinctrl-tb10x.c
pinctrl-tps6594.c
pinctrl-utils.c drivers/pinctrl: Switch to use kmemdup_array() 2024-08-26 10:27:52 +02:00
pinctrl-utils.h
pinctrl-xway.c
pinctrl-zynq.c pinctrl: pinctrl-zynq: fix module autoloading 2024-08-24 16:31:10 +02:00
pinctrl-zynqmp.c pinctrl: zynqmp: drop excess struct member description 2024-12-05 14:02:02 +01:00
pinmux.c pinmux: Use sequential access to access desc->pinmux data 2024-12-14 20:03:59 +01:00
pinmux.h