Skip to content
Commit 245595e8 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

drm/etnaviv: reject timeouts with tv_nsec >= NSEC_PER_SEC



Most kernel interfaces that take a timespec require normalized
representation with tv_nsec between 0 and NSEC_PER_SEC.

Passing values larger than 0x100000000ull further behaves differently
on 32-bit and 64-bit kernels, and can cause the latter to spend a long
time counting seconds in timespec64_sub()/set_normalized_timespec64().

Reject those large values at the user interface to enforce sane and
portable behavior.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 6cedb8b3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment