Skip to content
Commit e7d95527 authored by Chris Wilson's avatar Chris Wilson Committed by Jani Nikula
Browse files

drm/i915/gem: Delay tracking the GEM context until it is registered



Avoid exposing a partially constructed context by deferring the
list_add() from the initial construction to the end of registration.
Otherwise, if we peek into the list of contexts from inside debugfs, we
may see the partially constructed context and chase down some dangling
incomplete pointers.

Reported-by: default avatarCQ Tang <cq.tang@intel.com>
Fixes: 3aa9945a ("drm/i915: Separate GEM context construction and registration to userspace")
References: f6e8aa38 ("drm/i915: Report the number of closed vma held by each context in debugfs")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: CQ Tang <cq.tang@intel.com>
Cc: <stable@vger.kernel.org> # v5.2+
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200730092856.23615-1-chris@chris-wilson.co.uk


Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
(cherry picked from commit eb4dedae)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 856deb86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment