summaryrefslogtreecommitdiff
path: root/include/drm/drm_auth.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-12-10 22:52:52 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-12-13 09:36:13 +0100
commit5acc614ac47465fee6375a9af4740f618830762d (patch)
tree81ee1ad561d676a74dae3ac3b8b210cdf5b01676 /include/drm/drm_auth.h
parentb9fb2a21ac8058965a6b3fcae736cfa7f411d6eb (diff)
drm: Protect master->unique with dev->master_mutex
No one looks at the major/minor versions except the unique/busid stuff. If we protect that with the master_mutex (since it also affects the unique of each master, oh well) we can mark these two IOCTL with DRM_UNLOCKED. While doing this I realized that the comment for the magic_map is outdated, I've forgotten to update it in: commit d2b34ee62b409a03c6fe43c07b779983be51d017 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Fri Jun 17 09:33:21 2016 +0200 drm: Protect authmagic with master_mutex Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20161210215255.7765-1-daniel.vetter@ffwll.ch
Diffstat (limited to 'include/drm/drm_auth.h')
-rw-r--r--include/drm/drm_auth.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/drm/drm_auth.h b/include/drm/drm_auth.h
index 610223b0481b..155588eb8ccf 100644
--- a/include/drm/drm_auth.h
+++ b/include/drm/drm_auth.h
@@ -33,10 +33,7 @@
*
* @refcount: Refcount for this master object.
* @dev: Link back to the DRM device
- * @unique: Unique identifier: e.g. busid. Protected by drm_global_mutex.
- * @unique_len: Length of unique field. Protected by drm_global_mutex.
- * @magic_map: Map of used authentication tokens. Protected by struct_mutex.
- * @lock: DRI lock information.
+ * @lock: DRI1 lock information.
* @driver_priv: Pointer to driver-private information.
*
* Note that master structures are only relevant for the legacy/primary device
@@ -45,8 +42,20 @@
struct drm_master {
struct kref refcount;
struct drm_device *dev;
+ /**
+ * @unique: Unique identifier: e.g. busid. Protected by struct
+ * &drm_device master_mutex.
+ */
char *unique;
+ /**
+ * @unique_len: Length of unique field. Protected by struct &drm_device
+ * master_mutex.
+ */
int unique_len;
+ /**
+ * @magic_map: Map of used authentication tokens. Protected by struct
+ * &drm_device master_mutex.
+ */
struct idr magic_map;
struct drm_lock_data lock;
void *driver_priv;