Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/qxl: Don't take dev->struct_mutex in bo_force_delete

It really doesn't protect anything which doesn't have other locks
already. It also doesn't seem to be wired up into the driver unload
code fwiw, but that's a different issue.

Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

+1 -3
+1 -3
drivers/gpu/drm/qxl/qxl_object.c
··· 272 272 return; 273 273 dev_err(qdev->dev, "Userspace still has active objects !\n"); 274 274 list_for_each_entry_safe(bo, n, &qdev->gem.objects, list) { 275 - mutex_lock(&qdev->ddev->struct_mutex); 276 275 dev_err(qdev->dev, "%p %p %lu %lu force free\n", 277 276 &bo->gem_base, bo, (unsigned long)bo->gem_base.size, 278 277 *((unsigned long *)&bo->gem_base.refcount)); ··· 279 280 list_del_init(&bo->list); 280 281 mutex_unlock(&qdev->gem.mutex); 281 282 /* this should unref the ttm bo */ 282 - drm_gem_object_unreference(&bo->gem_base); 283 - mutex_unlock(&qdev->ddev->struct_mutex); 283 + drm_gem_object_unreference_unlocked(&bo->gem_base); 284 284 } 285 285 } 286 286