diff options
author | Haneen Mohammed <hamohammed.sa@gmail.com> | 2017-09-21 17:04:24 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-09-26 01:23:18 -0400 |
commit | 3fbe2e184d2fbc353425efa7b788aba64374119b (patch) | |
tree | 8441f365fdbec64d84b6a1595dc6d7ed5b76d76c | |
parent | d0d1aee5f7eda2f2cae0932a217e27493f2c2faa (diff) |
drm: Remove obsolete "This is gross" comment
Remove obsolete comment which was initially added in 2008 to annotate
that idr_find() was used before idr_remove() since idr_remove() didn't
use to return feedback. The comment now is irrelevant with
commit f6cd7daecff5 ("drm: Release driver references to handle before
making it available again").
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170921210424.GA21951@Haneen
-rw-r--r-- | drivers/gpu/drm/drm_gem.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 8bea0326e7a7..4e710ec40599 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c | |||
@@ -281,15 +281,6 @@ drm_gem_handle_delete(struct drm_file *filp, u32 handle) | |||
281 | { | 281 | { |
282 | struct drm_gem_object *obj; | 282 | struct drm_gem_object *obj; |
283 | 283 | ||
284 | /* This is gross. The idr system doesn't let us try a delete and | ||
285 | * return an error code. It just spews if you fail at deleting. | ||
286 | * So, we have to grab a lock around finding the object and then | ||
287 | * doing the delete on it and dropping the refcount, or the user | ||
288 | * could race us to double-decrement the refcount and cause a | ||
289 | * use-after-free later. Given the frequency of our handle lookups, | ||
290 | * we may want to use ida for number allocation and a hash table | ||
291 | * for the pointers, anyway. | ||
292 | */ | ||
293 | spin_lock(&filp->table_lock); | 284 | spin_lock(&filp->table_lock); |
294 | 285 | ||
295 | /* Check if we currently have a reference on the object */ | 286 | /* Check if we currently have a reference on the object */ |