]> www.infradead.org Git - users/jedix/linux-maple.git/commit
time: Move ktime_t overflow checking into timespec_valid_strict
authorJohn Stultz <john.stultz@linaro.org>
Wed, 12 Sep 2012 00:49:53 +0000 (20:49 -0400)
committerGuangyu Sun <guangyu.sun@oracle.com>
Mon, 8 Oct 2012 17:01:02 +0000 (10:01 -0700)
commit07888bc6465cf7a239e25f0db1e0dbc20fa1f177
tree362d791b1724473bd5d499f634ec610d7548d947
parent1e0df99139f48fda25a9187d9e31706e40d942fd
time: Move ktime_t overflow checking into timespec_valid_strict

commit cee58483cf56e0ba355fdd97ff5e8925329aa936 upstream

Andreas Bombe reported that the added ktime_t overflow checking added to
timespec_valid in commit 4e8b14526ca7 ("time: Improve sanity checking of
timekeeping inputs") was causing problems with X.org because it caused
timeouts larger then KTIME_T to be invalid.

Previously, these large timeouts would be clamped to KTIME_MAX and would
never expire, which is valid.

This patch splits the ktime_t overflow checking into a new
timespec_valid_strict function, and converts the timekeeping codes
internal checking to use this more strict function.

Reported-and-tested-by: Andreas Bombe <aeb@debian.org>
Cc: Zhouping Liu <zliu@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
include/linux/time.h
kernel/time/timekeeping.c