Skip to content

Commit

Permalink
drm/prime: fix error path in drm_gem_prime_fd_to_handle
Browse files Browse the repository at this point in the history
handle_unreference only clears up the obj->name and the reference,
but would leave a dangling handle in the idr. The right thing
to do is to call handle_delete.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Daniel Vetter authored and Dave Airlie committed Aug 21, 2013
1 parent a8e11d1 commit 730c4ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_prime.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ int drm_gem_prime_fd_to_handle(struct drm_device *dev,
/* hmm, if driver attached, we are relying on the free-object path
* to detach.. which seems ok..
*/
drm_gem_object_handle_unreference_unlocked(obj);
drm_gem_handle_delete(file_priv, *handle);
out_put:
dma_buf_put(dma_buf);
mutex_unlock(&file_priv->prime.lock);
Expand Down

0 comments on commit 730c4ff

Please sign in to comment.