drm/prime: fix error path deadlock fail
authorRob Clark <robdclark@gmail.com>
Thu, 9 Jun 2016 19:29:19 +0000 (15:29 -0400)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 13 Jun 2016 15:32:18 +0000 (17:32 +0200)
commitbd6e2732f0e2894ce792f344c41fc32591436fe3
treec2c0d81d7607979e05a7fa9cccc57dd88e3b2aba
parentbabb24fec12ce391157be8d7355df5a8e991355e
drm/prime: fix error path deadlock fail

There were a couple messed up things about this fail path.
(1) it would drop object_name_lock twice
(2) drm_gem_handle_delete() (in drm_gem_remove_prime_handles())
    needs to grab prime_lock

Reported-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465500559-17873-1-git-send-email-robdclark@gmail.com
drivers/gpu/drm/drm_prime.c