aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorDmitry Osipenko <[email protected]>2022-10-30 15:44:12 +0000
committerDmitry Osipenko <[email protected]>2022-11-02 10:53:57 +0000
commit444bbba708e804c13ad757068d1cb31ed6460754 (patch)
tree14030bfb4b2a36beeb838b3d75766b54b4596aa5 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parentdma-buf: Make locking consistent in dma_buf_detach() (diff)
downloadkernel-444bbba708e804c13ad757068d1cb31ed6460754.tar.gz
kernel-444bbba708e804c13ad757068d1cb31ed6460754.zip
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 <[email protected]> Reviewed-by: Christian König <[email protected]> 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 <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions