drm/ttm, drm/vmwgfx: Relax permission checking when opening surfaces

commit fe25deb773 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>
This commit is contained in:
Thomas Hellstrom 2017-03-27 11:21:25 +02:00 • committed by Greg Kroah-Hartman
commit b116797b81
5 changed files with 24 additions and 23 deletions