diff options
author | 2025-02-12 09:49:12 +0100 | |
---|---|---|
committer | 2025-02-13 15:49:45 +0100 | |
commit | ed15511a773df86205bda66c37193569575ae828 (patch) | |
tree | cb018d340038a34bc37a444e5a31a6650ac1f881 /drivers/gpu/drm/meson/meson_encoder_dsi.c | |
parent | drm: writeback: Fix use after free in drm_writeback_connector_cleanup() (diff) | |
download | wireguard-linux-ed15511a773df86205bda66c37193569575ae828.tar.xz wireguard-linux-ed15511a773df86205bda66c37193569575ae828.zip |
drm/vkms: Fix use after free and double free on init error
If the driver initialization fails, the vkms_exit() function might
access an uninitialized or freed default_config pointer and it might
double free it.
Fix both possible errors by initializing default_config only when the
driver initialization succeeded.
Reported-by: Louis Chauvet <louis.chauvet@bootlin.com>
Closes: https://lore.kernel.org/all/Z5uDHcCmAwiTsGte@louis-chauvet-laptop/
Fixes: 2df7af93fdad ("drm/vkms: Add vkms_config type")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Reviewed-by: Thomas Zimmermann <tzimmremann@suse.de>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250212084912.3196-1-jose.exposito89@gmail.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
Diffstat (limited to 'drivers/gpu/drm/meson/meson_encoder_dsi.c')
0 files changed, 0 insertions, 0 deletions