]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Separate GEM context construction and registration to userspace
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 21 Mar 2019 14:07:08 +0000 (14:07 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 21 Mar 2019 15:59:25 +0000 (15:59 +0000)
commit50b3d2262655ac1f12d73568c74a28fc1c4d0590
tree751067e92c1e9fe7a5aeef01d62dec2833ce78ef
parent93c6c453091fa68b03243c7e39bf5811d2ebc216
drm/i915: Separate GEM context construction and registration to userspace

In later patches, it became apparent that userspace can see a partially
constructed GEM context and begin using it before it was ready, to much
hilarity. Close this window of opportunity by lifting the registration of
the context with userspace (the insertion of the context into the filp's
idr) to the very end of the CONTEXT_CREATE ioctl.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190321140711.11190-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_gtt.h
drivers/gpu/drm/i915/selftests/huge_pages.c
drivers/gpu/drm/i915/selftests/i915_gem_context.c
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
drivers/gpu/drm/i915/selftests/mock_context.c