Re: [PATCH v3] drm/i915: Add to timeline requires the timeline mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tvrtko Ursulin (2019-07-08 13:18:02)
> 
> On 08/07/2019 12:39, Chris Wilson wrote:
> > v2: Though it doesn't affect the current users, contexts may share
> > timelines so check if we already hold the right mutex.

> > +int intel_context_prepare_remote_request(struct intel_context *ce,
> > +                                      struct i915_request *rq)
> > +{
> > +     struct intel_timeline *tl = ce->ring->timeline;
> > +     int err;
> > +
> > +     /* Only suitable for use in remotely modifying this context */
> > +     GEM_BUG_ON(rq->hw_context == ce);
> > +
> > +     if (rq->timeline != tl) { /* beware timeline sharing */
> > +             err = mutex_lock_interruptible_nested(&tl->mutex,
> > +                                                   SINGLE_DEPTH_NESTING);
> 
> Which caller is holding tl->mutex?

None today, but it is conceivable. So rather than have a mysterious
deadlock not reported by lockdep in the future, nip the problem in the
bud.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux