[Intel-gfx] [PATCH v3] drm/i915: Always normalize return timeout for wait_timeout_ioctl

Daniel Vetter daniel at ffwll.ch
Tue Apr 30 10:50:56 CEST 2013


On Sat, Apr 27, 2013 at 12:51:33PM -0700, Ben Widawsky wrote:
> On Fri, Apr 26, 2013 at 04:22:46PM +0300, ville.syrjala at linux.intel.com wrote:
> > From: Chris Wilson <chris at chris-wilson.co.uk>
> > 
> > As we recompute the remaining timeout after waiting, there is a
> > potential for that timeout to be less than zero and so need sanitizing.
> > The timeout is always returned to userspace and validated, so we should
> > always perform the sanitation.
> > 
> > v2 [vsyrjala]: Only normalize the timespec if it's invalid
> > v3: Add a comment to clarify the situation and remove the now
> >     useless WARN_ON() (ickle)
> > 
> > Cc: Ben Widawsky <ben at bwidawsk.net>
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> This does an excellent job of removing the warnings I'd sometimes see.
> 
> Unfortunately I've confirmed I can still reproduce the hang, and now
> with no errors to leave any clues. I can't promise, but I'm 75%ish
> certain I'd not always see a WARN before too (in fact I think that was
> the case when Chris wrote the original patch)
> 
> The frequency with which I see the hangs seem to be increasing as well.
> Does nobody else see this? I will have to take a shot at getting more
> info.

Picked up for -fixes, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list