summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_edid.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-17 14:00:54 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-10-05 15:55:17 +0300
commit064253c1c0625efd0362a0b7ecdbe8bee2a2904d (patch)
treee551137100c1d5a68f248655c37bee8185c472c7 /include/drm/drm_edid.h
parentdb05c481977599236f12a85e55de9f5ab37b0a2c (diff)
drm: fix use of freed memory in drm_mode_setcrtc
drm_mode_setcrtc() retries modesetting in case one of the functions it calls returns -EDEADLK. connector_set, mode and fb are freed before retrying, but they are not set to NULL. This can cause drm_mode_setcrtc() to use those variables. For example: On the first try __drm_mode_set_config_internal() returns -EDEADLK. connector_set, mode and fb are freed. Next retry starts, and drm_modeset_lock_all_ctx() returns -EDEADLK, and we jump to 'out'. The code will happily try to release all three again. This leads to crashes of different kinds, depending on the sequence the EDEADLKs happen. Fix this by setting the three variables to NULL at the start of the retry loop. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20180917110054.4053-1-tomi.valkeinen@ti.com
Diffstat (limited to 'include/drm/drm_edid.h')
0 files changed, 0 insertions, 0 deletions