Home
last modified time | relevance | path

Searched hist:"444 bbba708e804c13ad757068d1cb31ed6460754" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/gpu/drm/
H A Ddrm_client.cdiff 444bbba708e804c13ad757068d1cb31ed6460754 Sun Oct 30 16:44:12 CET 2022 Dmitry Osipenko <dmitry.osipenko@collabora.com> drm/client: Prevent NULL dereference in drm_client_buffer_delete()

The drm_gem_vunmap() will crash with a NULL dereference if the passed
object pointer is NULL. It wasn't a problem before we added the locking
support to drm_gem_vunmap function because the mapping argument was always
NULL together with the object. Make drm_client_buffer_delete() to check
whether GEM is NULL before trying to unmap the GEM, it will happen on
framebuffer creation error.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/dri-devel/Y1kFEGxT8MVlf32V@kili/
Fixes: 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations")
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221030154412.8320-3-dmitry.osipenko@collabora.com