exynos-linux-stable/drivers/reset
Geert Uytterhoeven 1012e97fb0 reset: Fix potential use-after-free in __of_reset_control_get()
[ Upstream commit b790c8ea5593d6dc3580adfad8e117eeb56af874 ]

Calling of_node_put() decreases the reference count of a device tree
object, and may free some data.

However, the of_phandle_args structure embedding it is passed to
reset_controller_dev.of_xlate() after that, so it may still be accessed.

Move the call to of_node_put() down to fix this.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[p.zabel@pengutronix.de: moved of_node_put after mutex_unlock]
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-25 09:53:42 +01:00
..
hisilicon reset: hi6220: Set module license so that it can be loaded 2018-11-10 07:42:47 -08:00
sti reset: fix Kconfig menu to include reset drivers in sub-menu 2016-05-30 09:37:47 +02:00
core.c reset: Fix potential use-after-free in __of_reset_control_get() 2019-11-25 09:53:42 +01:00
Kconfig reset: zynq: add driver Kconfig option 2016-08-30 17:08:51 +02:00
Makefile reset: hi6220: allow to compile test driver on other architectures 2016-08-30 17:09:14 +02:00
reset-ath79.c reset: ath79: add missing include 2016-08-25 13:27:23 +02:00
reset-berlin.c reset: berlin: Make reset_control_ops const 2016-02-08 16:11:25 +01:00
reset-lpc18xx.c reset: lpc18xx: get rid of global variables for restart notifier 2016-03-30 15:42:07 +02:00
reset-meson.c reset: Add support for the Amlogic Meson SoC Reset Controller 2016-06-01 08:21:10 +02:00
reset-oxnas.c reset: oxnas: Use devm register API and get rid of platform remove 2016-05-30 09:37:47 +02:00
reset-pistachio.c reset: pistachio: use devm_reset_controller_register() 2016-05-30 09:37:47 +02:00
reset-socfpga.c reset: socfpga: no need to store modrst_offset 2016-08-08 19:23:32 +02:00
reset-stm32.c drivers: reset: Add STM32 reset driver 2016-08-24 15:21:28 +02:00
reset-sunxi.c reset: sunxi: use devm_reset_controller_register() 2016-05-30 09:37:47 +02:00
reset-ti-syscon.c reset: ti_syscon: fix a ti_syscon_reset_status issue 2017-10-08 10:26:03 +02:00
reset-uniphier.c reset: uniphier: rename MIO reset to SD reset for Pro5, PXs2, LD20 SoCs 2016-10-22 18:31:42 +09:00
reset-zynq.c reset: zynq: use devm_reset_controller_register() 2016-05-30 09:37:47 +02:00