]> git.itanic.dy.fi Git - linux-stable/commit
drm/client: Fully protect modes[] with dev->mode_config.mutex
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 4 Apr 2024 20:33:25 +0000 (23:33 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 8 Apr 2024 15:01:17 +0000 (18:01 +0300)
commit3eadd887dbac1df8f25f701e5d404d1b90fd0fea
treea7bb4683acb225316a2a6639167869b511f3ad74
parent8ab58f6841b19423231c5db3378691ec80c778f8
drm/client: Fully protect modes[] with dev->mode_config.mutex

The modes[] array contains pointers to modes on the connectors'
mode lists, which are protected by dev->mode_config.mutex.
Thus we need to extend modes[] the same protection or by the
time we use it the elements may already be pointing to
freed/reused memory.

Cc: stable@vger.kernel.org
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10583
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240404203336.10454-2-ville.syrjala@linux.intel.com
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
drivers/gpu/drm/drm_client_modeset.c