drm/i915: Sanity check pread/pwrite
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 26 Sep 2010 19:50:05 +0000 (20:50 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 29 Oct 2010 04:51:29 +0000 (21:51 -0700)
commit264cf4e651212e9f38cb24399c3cf513e13adcd2
tree5cd4ae0ebc65ce603b2ee84d05cb1ad576b46072
parentf7352937752cdf338158a320b37e99b7189b411a
drm/i915: Sanity check pread/pwrite

commit ce9d419dbecc292cc3e06e8b1d6d123d3fa813a4 upstream.

Move the access control up from the fast paths, which are no longer
universally taken first, up into the caller. This then duplicates some
sanity checking along the slow paths, but is much simpler.
Tracked as CVE-2010-2962.

Reported-by: Kees Cook <kees@ubuntu.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/i915/i915_gem.c