diff options
author | Thomas Hellstrom <thomas@tungstengraphics.com> | 2006-08-07 08:22:10 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-09-21 15:32:31 -0400 |
commit | 8669cbc5e651bf4effa20e8c244a5a7d67da6fe9 (patch) | |
tree | a97ac359c8041bc39efc0f32cac26772a43a0736 /drivers/char/drm/drm_drv.c | |
parent | 3d45dbd611d1441d667b06acced9fbad3c8fcb1b (diff) |
drm: move drm authentication to new generic hash table.
Fix drm_remove_magic potential memory leak / corruption. Move drm
authentication token hashing to new generic hash table implementation.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_drv.c')
-rw-r--r-- | drivers/char/drm/drm_drv.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c index 3da72f7364f0..f9ecc8414b8a 100644 --- a/drivers/char/drm/drm_drv.c +++ b/drivers/char/drm/drm_drv.c | |||
@@ -155,12 +155,10 @@ int drm_lastclose(drm_device_t * dev) | |||
155 | del_timer(&dev->timer); | 155 | del_timer(&dev->timer); |
156 | 156 | ||
157 | /* Clear pid list */ | 157 | /* Clear pid list */ |
158 | for (i = 0; i < DRM_HASH_SIZE; i++) { | 158 | list_for_each_entry_safe(pt, next, &dev->magicfree, head) { |
159 | for (pt = dev->magiclist[i].head; pt; pt = next) { | 159 | list_del(&pt->head); |
160 | next = pt->next; | 160 | drm_ht_remove_item(&dev->magiclist, &pt->hash_item); |
161 | drm_free(pt, sizeof(*pt), DRM_MEM_MAGIC); | 161 | drm_free(pt, sizeof(*pt), DRM_MEM_MAGIC); |
162 | } | ||
163 | dev->magiclist[i].head = dev->magiclist[i].tail = NULL; | ||
164 | } | 162 | } |
165 | 163 | ||
166 | /* Clear AGP information */ | 164 | /* Clear AGP information */ |