]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2024 09:23:37 +0000 (11:23 +0200)
commit8ceb873d816786a7c8058f50d903574aff8d3764
treec829b495059afc9d1a9fcd0b19526ff795c74b5e
parente18070c622c63f0cab170348e320454728c277aa
drm/client: Fully protect modes[] with dev->mode_config.mutex

commit 3eadd887dbac1df8f25f701e5d404d1b90fd0fea upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/drm_client_modeset.c