diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-04-17 10:53:19 +0200 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-04-17 10:53:19 +0200 |
commit | 5432cc4abf672ed3adb10fd5d61a6a5716089a98 (patch) | |
tree | a96f58124e4b53c22d186d1bf9a85b778c264071 | |
parent | e805ca959dbef85ac7b508639a64832a7995703a (diff) |
Fix buffer object reference problems.
(Reported by Dave Airlie).
-rw-r--r-- | linux-core/drm_bo.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c index 4ecfb79c..88adfc98 100644 --- a/linux-core/drm_bo.c +++ b/linux-core/drm_bo.c @@ -1716,22 +1716,7 @@ int drm_bo_ioctl(DRM_IOCTL_ARGS) if (rep.ret) break; - /* - * Note: The following code is only to - * fill in the rep argument. drm_lookup_user_object ups the - * refcount which is decreased again when we're done with the bo. - */ - - mutex_lock(&dev->struct_mutex); - uo = drm_lookup_user_object(priv, req->handle); - entry = - drm_user_object_entry(uo, drm_buffer_object_t, - base); - atomic_dec(&entry->usage); - mutex_unlock(&dev->struct_mutex); - mutex_lock(&entry->mutex); - drm_bo_fill_rep_arg(entry, &rep); - mutex_unlock(&entry->mutex); + rep.ret = drm_bo_handle_info(priv, req->handle, &rep); break; case drm_bo_unreference: rep.ret = drm_user_object_unref(priv, req->handle, |