aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drmP.h
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas@tungstengraphics.com>2006-08-07 08:22:10 -0400
committerDave Airlie <airlied@linux.ie>2006-09-21 15:32:31 -0400
commit8669cbc5e651bf4effa20e8c244a5a7d67da6fe9 (patch)
treea97ac359c8041bc39efc0f32cac26772a43a0736 /drivers/char/drm/drmP.h
parent3d45dbd611d1441d667b06acced9fbad3c8fcb1b (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/drmP.h')
-rw-r--r--drivers/char/drm/drmP.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
index c93985bb91a2..fedaf013f848 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -105,7 +105,7 @@
105#define DRM_DEBUG_CODE 2 /**< Include debugging code if > 1, then 105#define DRM_DEBUG_CODE 2 /**< Include debugging code if > 1, then
106 also include looping detection. */ 106 also include looping detection. */
107 107
108#define DRM_HASH_SIZE 16 /**< Size of key hash table. Must be power of 2. */ 108#define DRM_MAGIC_HASH_ORDER 4 /**< Size of key hash table. Must be power of 2. */
109#define DRM_KERNEL_CONTEXT 0 /**< Change drm_resctx if changed */ 109#define DRM_KERNEL_CONTEXT 0 /**< Change drm_resctx if changed */
110#define DRM_RESERVED_CONTEXTS 1 /**< Change drm_resctx if changed */ 110#define DRM_RESERVED_CONTEXTS 1 /**< Change drm_resctx if changed */
111#define DRM_LOOPING_LIMIT 5000000 111#define DRM_LOOPING_LIMIT 5000000
@@ -277,7 +277,8 @@ typedef struct drm_devstate {
277} drm_devstate_t; 277} drm_devstate_t;
278 278
279typedef struct drm_magic_entry { 279typedef struct drm_magic_entry {
280 drm_magic_t magic; 280 drm_hash_item_t hash_item;
281 struct list_head head;
281 struct drm_file *priv; 282 struct drm_file *priv;
282 struct drm_magic_entry *next; 283 struct drm_magic_entry *next;
283} drm_magic_entry_t; 284} drm_magic_entry_t;
@@ -653,7 +654,8 @@ typedef struct drm_device {
653 /*@{ */ 654 /*@{ */
654 drm_file_t *file_first; /**< file list head */ 655 drm_file_t *file_first; /**< file list head */
655 drm_file_t *file_last; /**< file list tail */ 656 drm_file_t *file_last; /**< file list tail */
656 drm_magic_head_t magiclist[DRM_HASH_SIZE]; /**< magic hash table */ 657 drm_open_hash_t magiclist; /**< magic hash table */
658 struct list_head magicfree;
657 /*@} */ 659 /*@} */
658 660
659 /** \name Memory management */ 661 /** \name Memory management */