summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-02-01 11:34:47 +1000
committerDave Airlie <airlied@redhat.com>2018-02-01 11:34:47 +1000
commit7ec3c0957f05150e578a0126df330a6a72e64aae (patch)
tree8e3ebc6b9b199aa9cca936965a11326f50e45ca1 /drivers/gpu
parent559f17bec508548850654dd04525fd69d90f6d4e (diff)
parent761e05a702f5d537ffcca1ba933f9f0a968aa022 (diff)
downloadlinux-7ec3c0957f05150e578a0126df330a6a72e64aae.tar.bz2
Merge tag 'drm-misc-next-fixes-2018-01-31' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
This contains a fix to restrict what lessee can do with masters and another one when waiting for timeouts on reservation objects. * tag 'drm-misc-next-fixes-2018-01-31' of git://anongit.freedesktop.org/drm/drm-misc: drm: Check for lessee in DROP_MASTER ioctl dma-buf: fix reservation_object_wait_timeout_rcu once more v2
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_auth.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c
index aad468d170a7..d9c0f7573905 100644
--- a/drivers/gpu/drm/drm_auth.c
+++ b/drivers/gpu/drm/drm_auth.c
@@ -230,6 +230,12 @@ int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
if (!dev->master)
goto out_unlock;
+ if (file_priv->master->lessor != NULL) {
+ DRM_DEBUG_LEASE("Attempt to drop lessee %d as master\n", file_priv->master->lessee_id);
+ ret = -EINVAL;
+ goto out_unlock;
+ }
+
ret = 0;
drm_drop_master(dev, file_priv);
out_unlock: