Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07f1c7a7 authored by Dave Airlie's avatar Dave Airlie
Browse files

drm: check for minor master before allowing drop master.



When fast user switching a lot eventually we get to the point,
where we were checking for the wrong thing in this function.

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 6b008426
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -185,6 +185,9 @@ int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
	if (!file_priv->is_master)
		return -EINVAL;

	if (!file_priv->minor->master)
		return -EINVAL;

	mutex_lock(&dev->struct_mutex);
	drm_master_put(&file_priv->minor->master);
	file_priv->is_master = 0;