summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_fops.c
diff options
context:
space:
mode:
authorThomas Hellstrom2006-08-07 14:22:10 +0200
committerDave Airlie2006-09-21 21:32:31 +0200
commit8669cbc5e651bf4effa20e8c244a5a7d67da6fe9 (patch)
treea97ac359c8041bc39efc0f32cac26772a43a0736 /drivers/char/drm/drm_fops.c
parentdrm: Add the P4VM800PRO (?) PCI ID. (diff)
downloadkernel-qcow2-linux-8669cbc5e651bf4effa20e8c244a5a7d67da6fe9.tar.gz
kernel-qcow2-linux-8669cbc5e651bf4effa20e8c244a5a7d67da6fe9.tar.xz
kernel-qcow2-linux-8669cbc5e651bf4effa20e8c244a5a7d67da6fe9.zip
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 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)
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)