Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Dave Airlie <airlied@redhat.com>

+3
+3
drivers/gpu/drm/drm_stub.c
··· 185 185 if (!file_priv->is_master) 186 186 return -EINVAL; 187 187 188 + if (!file_priv->minor->master) 189 + return -EINVAL; 190 + 188 191 mutex_lock(&dev->struct_mutex); 189 192 drm_master_put(&file_priv->minor->master); 190 193 file_priv->is_master = 0;