Quoting Joonas Lahtinen (2017-08-14 11:42:05) > On Fri, 2017-08-11 at 11:57 +0100, Chris Wilson wrote: > > The wait-ioctl is optionally supplied a timeout with nanosecond > > precision in a s64 field. We use nsecs_to_jiffies64() to convert that > > into the jiffies consumed by the scheduler, but internally > > nsecs_to_jiffies64() does not guard against overflow (as it's purpose is > > for use by the scheduler and not drivers!). So we must guard against the > > overflow ourselves, and in the process note that we may then return > > much earlier than the timeout selected by the user, so don't report > > ETIME unless we do hit the timeout. (Woe betold us though if the user > > waits for a year (32bit) and the request is still not complete!) > > > > v2: Refine overflow detection (to not include an overffow itself) > > > > Reported-by: Jason Ekstrand <jason.ekstrand@xxxxxxxxx> > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> > > Cc: Daniel Vetter <daniel.vetter@xxxxxxxx> > > Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> And pushed, thanks for the review. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx