[Mesa-dev] [PATCH] i965: Fix uint64_t overflow in intel_client_wait_sync()

Chad Versace chad.versace at intel.com
Tue Mar 3 10:09:59 PST 2015


On 03/02/2015 04:27 PM, Kristian Høgsberg wrote:
> DRM_IOCTL_I915_GEM_WAIT takes an int64_t for the timeout value but
> GL_ARB_sync takes an uint64_t.  Further, the ioctl used to wait
> indefinitely when passed a negative timeout, but it's been broken and
> now returns immediately in that case.  Thus, if an application passes
> UINT64_MAX to wait forever, we overflow to -1LL and return immediately.
> Work around this mess by clamping the wait timeout to INT64_MAX.
> 
> Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>

Reviewed-by: Chad Versace <chad.versace at intel.com>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150303/b86649b7/attachment.sig>


More information about the mesa-dev mailing list