diff options
author | Thomas Hellstrom <thomas@tungstengraphics.com> | 2006-08-07 22:22:10 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-09-22 05:32:31 +1000 |
commit | 8669cbc5e651bf4effa20e8c244a5a7d67da6fe9 (patch) | |
tree | a97ac359c8041bc39efc0f32cac26772a43a0736 /drivers/char/drm/drm_fops.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_fops.c')
-rw-r--r-- | drivers/char/drm/drm_fops.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c index 51ccc82bf61..2bbf45d85c3 100644 --- a/drivers/char/drm/drm_fops.c +++ b/drivers/char/drm/drm_fops.c @@ -72,10 +72,8 @@ static int drm_setup(drm_device_t * dev) for (i = 0; i < ARRAY_SIZE(dev->counts); i++) atomic_set(&dev->counts[i], 0); - for (i = 0; i < DRM_HASH_SIZE; i++) { - dev->magiclist[i].head = NULL; - dev->magiclist[i].tail = NULL; - } + drm_ht_create(&dev->magiclist, DRM_MAGIC_HASH_ORDER); + INIT_LIST_HEAD(&dev->magicfree); dev->ctxlist = drm_alloc(sizeof(*dev->ctxlist), DRM_MEM_CTXLIST); if (dev->ctxlist == NULL) |