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_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 51ccc82bf612..2bbf45d85c35 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) | |||
72 | for (i = 0; i < ARRAY_SIZE(dev->counts); i++) | 72 | for (i = 0; i < ARRAY_SIZE(dev->counts); i++) |
73 | atomic_set(&dev->counts[i], 0); | 73 | atomic_set(&dev->counts[i], 0); |
74 | 74 | ||
75 | for (i = 0; i < DRM_HASH_SIZE; i++) { | 75 | drm_ht_create(&dev->magiclist, DRM_MAGIC_HASH_ORDER); |
76 | dev->magiclist[i].head = NULL; | 76 | INIT_LIST_HEAD(&dev->magicfree); |
77 | dev->magiclist[i].tail = NULL; | ||
78 | } | ||
79 | 77 | ||
80 | dev->ctxlist = drm_alloc(sizeof(*dev->ctxlist), DRM_MEM_CTXLIST); | 78 | dev->ctxlist = drm_alloc(sizeof(*dev->ctxlist), DRM_MEM_CTXLIST); |
81 | if (dev->ctxlist == NULL) | 79 | if (dev->ctxlist == NULL) |