summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_fops.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas@tungstengraphics.com>2006-08-07 22:22:10 +1000
committerDave Airlie <airlied@linux.ie>2006-09-22 05:32:31 +1000
commit8669cbc5e651bf4effa20e8c244a5a7d67da6fe9 (patch)
treea97ac359c8041bc39efc0f32cac26772a43a0736 /drivers/char/drm/drm_fops.c
parent3d45dbd611d1441d667b06acced9fbad3c8fcb1b (diff)
downloadop-kernel-dev-8669cbc5e651bf4effa20e8c244a5a7d67da6fe9.zip
op-kernel-dev-8669cbc5e651bf4effa20e8c244a5a7d67da6fe9.tar.gz
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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c
index 51ccc82b..2bbf45d 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)
OpenPOWER on IntegriCloud