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
..
analogix_dp-rockchip.c
cdn-dp-core.c
cdn-dp-core.h
cdn-dp-reg.c
cdn-dp-reg.h
dw_hdmi-rockchip.c drm/rockchip: dw_hdmi: cleanup drm encoder during unbind 2023-05-24 17:32:35 +01:00
dw-mipi-dsi-rockchip.c
inno_hdmi.c
inno_hdmi.h
Kconfig
Makefile
rk3066_hdmi.c
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
rockchip_drm_vop.h
rockchip_drm_vop2.c
rockchip_drm_vop2.h
rockchip_lvds.c
rockchip_lvds.h
rockchip_rgb.c
rockchip_rgb.h
rockchip_vop_reg.c
rockchip_vop_reg.h
rockchip_vop2_reg.c