[Intel-gfx] [PATCH 10/22] drm/i915: Separate GEM context construction and registration to userspace
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Mon Mar 18 16:46:31 UTC 2019
On 18/03/2019 16:32, Chris Wilson wrote:
> 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.)
So in the next patch you update the assert to ctx_idr_lock. Too evil? :))
Regards,
Tvrtko
More information about the Intel-gfx
mailing list