Skip to content
Snippets Groups Projects
Commit 535c2668 authored by Zbigniew Kempczyński's avatar Zbigniew Kempczyński
Browse files

lib/igt_core: fix overflow in micro/nano-seconds calculations


Multiplication without using casting to long (long) for at least
one argument in expression may cause overflow especially when we're
using this for calculating timeouts in nanoseconds precision.

Ensure we're picking valid ul/ull suffix for base definitions for
all dependents.

Reported-by: default avatarIlia Levi <ilia.levi@intel.com>
Closes: #163


Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Ilia Levi <ilia.levi@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarKamil Konieczny <kamil.konieczny@linux.intel.com>
Link: https://lore.kernel.org/r/20241218060730.18961-1-zbigniew.kempczynski@intel.com


Signed-off-by: default avatarZbigniew Kempczyński <zbigniew.kempczynski@intel.com>
parent 8bce68b0
No related branches found
No related tags found
No related merge requests found
Pipeline #1332170 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment