diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/drm_drv.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index 53677bd6e4f..aed8d64de7c 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_drv.c,v 1.160 2019/04/28 08:18:16 kettenis Exp $ */ +/* $OpenBSD: drm_drv.c,v 1.161 2019/05/02 09:47:16 kettenis Exp $ */ /*- * Copyright 2007-2009 Owain G. Ainsworth <oga@openbsd.org> * Copyright © 2008 Intel Corporation @@ -589,15 +589,11 @@ drmopen(dev_t kdev, int flags, int fmt, struct proc *p) } mutex_lock(&dev->struct_mutex); - /* first opener automatically becomes master if root */ - if (SPLAY_EMPTY(&dev->files) && !DRM_SUSER(p)) { - mutex_unlock(&dev->struct_mutex); - ret = EPERM; - goto out_prime_destroy; - } - + /* first opener automatically becomes master */ if (drm_is_primary_client(file_priv)) file_priv->is_master = SPLAY_EMPTY(&dev->files); + if (file_priv->is_master) + file_priv->authenticated = 1; SPLAY_INSERT(drm_file_tree, &dev->files, file_priv); mutex_unlock(&dev->struct_mutex); |