mirror-linux/drivers/gpu/drm/rockchip
Toby Chen 110d420252 drm/rockchip: dw_hdmi: cleanup drm encoder during unbind
[ Upstream commit b5af48eedc ]

This fixes a use-after-free crash during rmmod.

The DRM encoder is embedded inside the larger rockchip_hdmi,
which is allocated with the component. The component memory
gets freed before the main drm device is destroyed. Fix it
by running encoder cleanup before tearing down its container.

Signed-off-by: Toby Chen <tobyc@nvidia.com>
[moved encoder cleanup above clk_disable, similar to bind-error-path]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230317005126.496-1-tobyc@nvidia.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-24 17:32:35 +01:00
..
Kconfig
Makefile
analogix_dp-rockchip.c
cdn-dp-core.c drm/rockchip: Use drm_mode_copy() 2022-12-31 13:33:01 +01:00
cdn-dp-core.h
cdn-dp-reg.c
cdn-dp-reg.h
dw-mipi-dsi-rockchip.c drm/rockchip: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() 2022-12-31 13:32:59 +01:00
dw_hdmi-rockchip.c drm/rockchip: dw_hdmi: cleanup drm encoder during unbind 2023-05-24 17:32:35 +01:00
inno_hdmi.c drm/rockchip: Use drm_mode_copy() 2022-12-31 13:33:01 +01:00
inno_hdmi.h
rk3066_hdmi.c drm/rockchip: Use drm_mode_copy() 2022-12-31 13:33:01 +01:00
rk3066_hdmi.h
rockchip_drm_drv.c
rockchip_drm_drv.h
rockchip_drm_fb.c
rockchip_drm_fb.h
rockchip_drm_gem.c drm/rockchip: Drop unbalanced obj unref 2023-05-11 23:03:07 +09:00
rockchip_drm_gem.h
rockchip_drm_vop.c drm/rockchip: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() 2022-12-31 13:32:59 +01:00
rockchip_drm_vop.h
rockchip_drm_vop2.c drm/rockchip: vop2: Use regcache_sync() to fix suspend/resume 2023-04-26 14:28:40 +02:00
rockchip_drm_vop2.h
rockchip_lvds.c
rockchip_lvds.h
rockchip_rgb.c
rockchip_rgb.h
rockchip_vop2_reg.c
rockchip_vop_reg.c
rockchip_vop_reg.h