drm/vmwgfx: Type-check lookups of fence objects
authorThomas Hellstrom <thellstrom@vmware.com>
Mon, 27 Mar 2017 09:09:08 +0000 (11:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Apr 2017 10:41:10 +0000 (12:41 +0200)
commit92cc48166e4909c5eb6b1e2abbab9ab07b64b6dd
treeda04262f774cdee6022537543de572a013458d0d
parent9c2b46e720d5b083268ca0131f513a90696f3a82
drm/vmwgfx: Type-check lookups of fence objects

commit f7652afa8eadb416b23eb57dec6f158529942041 upstream.

A malicious caller could otherwise hand over handles to other objects
causing all sorts of interesting problems.

Testing done: Ran a Fedora 25 desktop using both Xorg and
gnome-shell/Wayland.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c