OSDN Git Service

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)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 30 Mar 2017 09:43:39 +0000 (11:43 +0200)
commitfe25deb7737ce6c0879ccf79c99fa1221d428bf2
tree8e5091f95dc74616cb5aab8560f8a0b7d1b8e577
parent63774069d9527a1aeaa4aa20e929ef5e8e9ecc38
drm/ttm, drm/vmwgfx: Relax permission checking when opening surfaces

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.

Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.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