kernel_samsung_a53x/drivers/pinctrl
Dmitry Torokhov 058761de0b pinctrl: avoid unsafe code pattern in find_pinctrl()
commit c153a4edff6ab01370fcac8e46f9c89cca1060c2 upstream.

The code in find_pinctrl() takes a mutex and traverses a list of pinctrl
structures. Later the caller bumps up reference count on the found
structure. Such pattern is not safe as pinctrl that was found may get
deleted before the caller gets around to increasing the reference count.

Fix this by taking the reference count in find_pinctrl(), while it still
holds the mutex.

Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/ZQs1RgTKg6VJqmPs@google.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-08 11:25:51 +01:00
..
actions Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aspeed Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
berlin Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cirrus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
freescale Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mediatek Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
meson Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvebu Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nomadik Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nuvoton Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pxa Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
renesas pinctrl: renesas: rzn1: Enable missing PINMUX 2024-11-08 11:25:46 +01:00
samsung Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sirf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spear Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sprd Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunxi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tegra Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uniphier Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
visconti Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vt8500 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zte Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.c pinctrl: avoid unsafe code pattern in find_pinctrl() 2024-11-08 11:25:51 +01:00
core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
devicetree.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
devicetree.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinconf-generic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinconf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinconf.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-amd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-amd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-artpec6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-as3722.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-at91-pio4.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-at91.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-at91.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-axp209.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-bm1880.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-coh901.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-coh901.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-da850-pupd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-da9062.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-digicolor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-equilibrium.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-equilibrium.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-falcon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-gemini.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-ingenic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-lantiq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-lantiq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-lpc18xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-max77620.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-mcp23s08.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-mcp23s08.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-mcp23s08_i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-mcp23s08_spi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-ocelot.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-oxnas.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-palmas.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-pic32.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-pic32.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-pistachio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-rk805.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-rockchip.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-samsung-s2mpm07.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-samsung-s2mps26.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-samsung-s2mpu13.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-samsung-s2mpu14.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-single.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-st.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-stmfx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-sx150x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-tb10x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-u300.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-utils.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-utils.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-xway.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinctrl-zynq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinmux.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pinmux.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00