summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_vma_manager.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-09-03 11:31:55 +0200
committerChris Wilson <chris@chris-wilson.co.uk>2018-09-04 20:00:32 +0200
commit5ddd6582cd7ba018b7527eed1777b7d83e6d9b62 (patch)
tree2c899d75eff5d048f68d8157916ac729ec68f012 /drivers/gpu/drm/drm_vma_manager.c
parentdrm: Suppress user controlled spam for invalid drm_wait_vblank_ioctl (diff)
downloadlinux-5ddd6582cd7ba018b7527eed1777b7d83e6d9b62.tar.xz
linux-5ddd6582cd7ba018b7527eed1777b7d83e6d9b62.zip
drm: Remove "protection" around drm_vma_offset_manager_destroy()
Using a spinlock to serialize the destroy function, within the destroy function itself does not prevent the buggy driver from shooting themselves in the foot - either way they still have a use-after-free issue. Reported-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Liviu Dudau <Liviu.Dudau@arm.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20180903093155.3825-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/drm_vma_manager.c')
-rw-r--r--drivers/gpu/drm/drm_vma_manager.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_vma_manager.c b/drivers/gpu/drm/drm_vma_manager.c
index a6b2fe36b025..c5d0d2358301 100644
--- a/drivers/gpu/drm/drm_vma_manager.c
+++ b/drivers/gpu/drm/drm_vma_manager.c
@@ -103,10 +103,7 @@ EXPORT_SYMBOL(drm_vma_offset_manager_init);
*/
void drm_vma_offset_manager_destroy(struct drm_vma_offset_manager *mgr)
{
- /* take the lock to protect against buggy drivers */
- write_lock(&mgr->vm_lock);
drm_mm_takedown(&mgr->vm_addr_space_mm);
- write_unlock(&mgr->vm_lock);
}
EXPORT_SYMBOL(drm_vma_offset_manager_destroy);