timecompare: fix half-Y2K38 problem in timecompare_update while calculating offset
authorBarry Song <21cnbao@gmail.com>
Wed, 16 Dec 2009 00:45:34 +0000 (16:45 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2009 15:19:57 +0000 (07:19 -0800)
commitf065f41f48569122b5bcddbd1ba2354f7cc29fdc
tree68606305bfb3aba16437017e0596ccae11e6f6db
parent4365a5676fa3aa1d5ae6c90c22a0044f09ba584e
timecompare: fix half-Y2K38 problem in timecompare_update while calculating offset

ktime will overflow from 03:14:07 UTC on Tuesday, 19 January 2038,
ktime_add() in timecompare_update() will overflow a half earlier.  As a
result, wrong offset will be gotten, then cause some strange problems.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Patrick Ohly <patrick.ohly@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/time/timecompare.c