|
@@ -185,6 +185,9 @@ int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
|
|
if (!file_priv->is_master)
|
|
if (!file_priv->is_master)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
+ if (!file_priv->minor->master)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
mutex_lock(&dev->struct_mutex);
|
|
mutex_lock(&dev->struct_mutex);
|
|
drm_master_put(&file_priv->minor->master);
|
|
drm_master_put(&file_priv->minor->master);
|
|
file_priv->is_master = 0;
|
|
file_priv->is_master = 0;
|