summaryrefslogtreecommitdiff
path: root/kernel/power/Kconfig
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2006-09-06 00:03:42 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-06 11:00:02 -0700
commit96dd7421a06a5bc6eb731323b95efcb2fd864854 (patch)
treea450951e439f897ee92ba6b068efb77c0edc6a1a /kernel/power/Kconfig
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 <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Frank v Waveren <fvw@var.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/power/Kconfig')
0 files changed, 0 insertions, 0 deletions