linux/drivers/gpu/drm/vc4
Maxime Ripard d134c5ff71
drm/vc4: kms: Clear the HVS FIFO commit pointer once done
Commit 9ec03d7f1e ("drm/vc4: kms: Wait on previous FIFO users before a
commit") introduced a wait on the previous commit done on a given HVS
FIFO.

However, we never cleared that pointer once done. Since
drm_crtc_commit_put can free the drm_crtc_commit structure directly if
we were the last user, this means that it can lead to a use-after free
if we were to duplicate the state, and that stale pointer would even be
copied to the new state.

Set the pointer to NULL once we're done with the wait so that we don't
carry over a pointer to a free'd structure.

Fixes: 9ec03d7f1e ("drm/vc4: kms: Wait on previous FIFO users before a commit")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Tested-by: Jian-Hong Pan <jhp@endlessos.org>
Link: https://lore.kernel.org/r/20211117094527.146275-5-maxime@cerno.tech
2021-11-29 15:17:57 +01:00
..
Kconfig drm/vc4: hdmi: Register HDMI codec 2021-06-23 14:32:28 +02:00
Makefile
vc4_bo.c drm/vc4: fix error code in vc4_create_object() 2021-11-19 11:59:15 +01:00
vc4_crtc.c drm/vc4: crtc: Lookup the encoder from the register at boot 2021-05-24 14:42:07 +02:00
vc4_debugfs.c
vc4_dpi.c drm/vc4: dpi: Switch to devm_drm_of_get_bridge 2021-09-14 10:39:30 +02:00
vc4_drv.c drm/vc4: Make use of the helper function devm_platform_ioremap_resource() 2021-09-01 11:43:25 +02:00
vc4_drv.h drm/vc4: Convert to Linux IRQ interfaces 2021-08-10 20:13:53 +02:00
vc4_dsi.c drm/vc4: dsi: Switch to devm_drm_of_get_bridge 2021-09-14 10:40:24 +02:00
vc4_fence.c
vc4_gem.c drm/vc4: remove unneeded variable: "ret" 2021-02-09 17:16:57 +01:00
vc4_hdmi_phy.c drm/vc4: hdmi: Use the connector state pixel rate for the PHY 2020-12-16 10:11:48 +01:00
vc4_hdmi_regs.h drm/vc4: hdmi: Enable the scrambler 2021-05-24 14:43:36 +02:00
vc4_hdmi.c Linux 5.15-rc7 2021-10-28 14:59:38 +10:00
vc4_hdmi.h drm/vc4: hdmi: Remove redundant variables 2021-07-29 10:41:16 +02:00
vc4_hvs.c drm pull for 5.12-rc1 2021-02-21 14:44:44 -08:00
vc4_irq.c drm/vc4: Convert to Linux IRQ interfaces 2021-08-10 20:13:53 +02:00
vc4_kms.c drm/vc4: kms: Clear the HVS FIFO commit pointer once done 2021-11-29 15:17:57 +01:00
vc4_packet.h
vc4_perfmon.c
vc4_plane.c Merge drm/drm-fixes into drm-next 2021-04-13 23:15:09 +02:00
vc4_qpu_defines.h
vc4_regs.h drm/vc4: hdmi: Set HDMI_MAI_FMT 2021-06-23 14:32:27 +02:00
vc4_render_cl.c
vc4_trace_points.c
vc4_trace.h
vc4_txp.c drm/vc4: txp: Properly set the possible_crtcs mask 2021-05-24 14:41:28 +02:00
vc4_v3d.c drm/vc4: Convert to Linux IRQ interfaces 2021-08-10 20:13:53 +02:00
vc4_validate_shaders.c
vc4_validate.c
vc4_vec.c drm/vc4: Separate VEC compatible variants 2021-05-24 13:52:33 +02:00