]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
drm/ttm, drm/vmwgfx: Relax permission checking when opening surfaces
authorThomas Hellstrom <thellstrom@vmware.com>
Mon, 27 Mar 2017 09:21:25 +0000 (11:21 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:11:56 +0000 (10:11 +0200)
commit9b59d5e5740d2bf5cd60c0042812c46bc0099ca1
treec97008104f15f42dcfc3d37f4acb2d09a9a2c166
parent7dac4774dbc631264e93746411bedeefb563e174
drm/ttm, drm/vmwgfx: Relax permission checking when opening surfaces

BugLink: http://bugs.launchpad.net/bugs/1682130
commit fe25deb7737ce6c0879ccf79c99fa1221d428bf2 upstream.

Previously, when a surface was opened using a legacy (non prime) handle,
it was verified to have been created by a client in the same master realm.
Relax this so that opening is also allowed recursively if the client
already has the surface open.

This works around a regression in svga mesa where opening of a shared
surface is used recursively to obtain surface information.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/gpu/drm/ttm/ttm_object.c
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
include/drm/ttm/ttm_object.h