[Intel-gfx] [PATCH 10/22] drm/i915: Separate GEM context construction and registration to userspace
Chris Wilson
chris at chris-wilson.co.uk
Mon Mar 18 16:32:47 UTC 2019
Quoting Chris Wilson (2019-03-18 16:30:58)
> Quoting Tvrtko Ursulin (2019-03-18 16:22:12)
> >
> > On 18/03/2019 09:51, Chris Wilson wrote:
> > > +static int gem_context_register(struct i915_gem_context *ctx,
> > > + struct drm_i915_file_private *fpriv)
> > > +{
> > > + int ret;
> > > +
> >
> > Assert struct mutex for now? Without it userspace can still see not
> > fully initialized ctx. It is kind of two arguments but good for
> > documentation nevertheless I think.
>
> The goal is that we need to fix that now. And we can't hold struct_mutex
> across the extensions, as we want to wrap ctx_setparam which expects to
> be able to take struct_mutex. So it has to be registered outside of
> struct_mutex in this or the next path.
Waitasec... It is the very next patch that drops the struct_mutex. (I
was thinking it was removed in this patch.)
-Chris
More information about the Intel-gfx
mailing list