Re: [PATCH] drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all

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

 



On Wed, Nov 01, 2017 at 02:08:37PM +0000, Chris Wilson wrote:
> Quoting Daniel Vetter (2017-10-31 16:38:26)
> > On Tue, Oct 31, 2017 at 03:28:01PM +0200, Ville Syrjälä wrote:
> > > On Tue, Oct 31, 2017 at 11:55:35AM +0000, Chris Wilson wrote:
> > > > To acquire all modeset locks requires a ww_ctx to be allocated. As this
> > > > is the legacy path and the allocation small, to reduce the changes
> > > > required (and complex untested error handling) to the legacy drivers, we
> > > > simply assume that the allocation succeeds. At present, it relies on the
> > > > too-small-to-fail rule, but syzbot found that by injecting a failure
> > > > here we would hit the WARN. Document that this allocation must succeed
> > > > with __GFP_NOFAIL.
> > 
> > Note that for atomic drivers at least all the core/helper paths are fixed
> > up correctly. But e.g. i915 has still plenty of callsites in its own code,
> > mostly debugfs.
> > 
> > > > Reported-by: syzbot (syzkaller)
> > > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > > > Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
> > > 
> > > Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > 
> > Applied, thanks.
> 
> Just curious as it hasn't shown up in drm-tip yet, so I'm worrying if it
> found a crack to hide in.

Indeed it found a crack :-/

Pushed now, thanks for reminding me.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux