summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-17 13:00:54 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-10-05 14:55:17 +0200
commit064253c1c0625efd0362a0b7ecdbe8bee2a2904d (patch)
treee551137100c1d5a68f248655c37bee8185c472c7 /Documentation
parentdrm: fb-helper: Reject all pixel format changing requests (diff)
downloadlinux-064253c1c0625efd0362a0b7ecdbe8bee2a2904d.tar.xz
linux-064253c1c0625efd0362a0b7ecdbe8bee2a2904d.zip
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 'Documentation')
0 files changed, 0 insertions, 0 deletions