Deleted Added
full compact
drm_auth.c (183573) drm_auth.c (183833)
1/*-
2 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
3 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation

--- 15 unchanged lines hidden (view full) ---

24 *
25 * Authors:
26 * Rickard E. (Rik) Faith <faith@valinux.com>
27 * Gareth Hughes <gareth@valinux.com>
28 *
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
3 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation

--- 15 unchanged lines hidden (view full) ---

24 *
25 * Authors:
26 * Rickard E. (Rik) Faith <faith@valinux.com>
27 * Gareth Hughes <gareth@valinux.com>
28 *
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/dev/drm/drm_auth.c 183573 2008-10-03 16:59:11Z rnoland $");
32__FBSDID("$FreeBSD: head/sys/dev/drm/drm_auth.c 183833 2008-10-13 18:03:27Z rnoland $");
33
34/** @file drm_auth.c
35 * Implementation of the get/authmagic ioctls implementing the authentication
36 * scheme between the master and clients.
37 */
38
39#include "dev/drm/drmP.h"
40

--- 31 unchanged lines hidden (view full) ---

72 int hash;
73 drm_magic_entry_t *entry;
74
75 DRM_DEBUG("%d\n", magic);
76
77 DRM_SPINLOCK_ASSERT(&dev->dev_lock);
78
79 hash = drm_hash_magic(magic);
33
34/** @file drm_auth.c
35 * Implementation of the get/authmagic ioctls implementing the authentication
36 * scheme between the master and clients.
37 */
38
39#include "dev/drm/drmP.h"
40

--- 31 unchanged lines hidden (view full) ---

72 int hash;
73 drm_magic_entry_t *entry;
74
75 DRM_DEBUG("%d\n", magic);
76
77 DRM_SPINLOCK_ASSERT(&dev->dev_lock);
78
79 hash = drm_hash_magic(magic);
80 entry = malloc(sizeof(*entry), M_DRM, M_ZERO | M_NOWAIT);
80 entry = malloc(sizeof(*entry), DRM_MEM_MAGIC, M_ZERO | M_NOWAIT);
81 if (!entry)
82 return ENOMEM;
83 entry->magic = magic;
84 entry->priv = priv;
85 entry->next = NULL;
86
87 if (dev->magiclist[hash].tail) {
88 dev->magiclist[hash].tail->next = entry;

--- 27 unchanged lines hidden (view full) ---

116 dev->magiclist[hash].head = pt->next;
117 }
118 if (dev->magiclist[hash].tail == pt) {
119 dev->magiclist[hash].tail = prev;
120 }
121 if (prev) {
122 prev->next = pt->next;
123 }
81 if (!entry)
82 return ENOMEM;
83 entry->magic = magic;
84 entry->priv = priv;
85 entry->next = NULL;
86
87 if (dev->magiclist[hash].tail) {
88 dev->magiclist[hash].tail->next = entry;

--- 27 unchanged lines hidden (view full) ---

116 dev->magiclist[hash].head = pt->next;
117 }
118 if (dev->magiclist[hash].tail == pt) {
119 dev->magiclist[hash].tail = prev;
120 }
121 if (prev) {
122 prev->next = pt->next;
123 }
124 free(pt, M_DRM);
124 free(pt, DRM_MEM_MAGIC);
125 return 0;
126 }
127 }
128
129 return EINVAL;
130}
131
132/**

--- 58 unchanged lines hidden ---
125 return 0;
126 }
127 }
128
129 return EINVAL;
130}
131
132/**

--- 58 unchanged lines hidden ---