aboutsummaryrefslogtreecommitdiff
path: root/scripts/basic/fixdep.c
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2006-09-06 00:03:42 -0700
committerLinus Torvalds <[email protected]>2006-09-06 11:00:02 -0700
commit96dd7421a06a5bc6eb731323b95efcb2fd864854 (patch)
treea450951e439f897ee92ba6b068efb77c0edc6a1a /scripts/basic/fixdep.c
parentfe2bbc4832659b7ffc867cac03e0a92ae81e11e4 (diff)
[PATCH] prevent timespec/timeval to ktime_t overflow
Frank v. Waveren pointed out that on 64bit machines the timespec to ktime_t conversion might overflow. This is also true for timeval to ktime_t conversions. This breaks a "sleep inf" on 64bit machines. While a timespec/timeval with tx.sec = MAX_LONG is valid by specification the internal representation of ktime_t is based on nanoseconds. The conversion of seconds to nanoseconds overflows for seconds values >= (MAX_LONG / NSEC_PER_SEC). Check the seconds argument to the conversion and limit it to the maximum time which can be represented by ktime_t. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Frank v Waveren <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/basic/fixdep.c')
0 files changed, 0 insertions, 0 deletions