Re: [PATCH] Fix half-Y2K38 problem in timecompare_update while calculating offset

From: Barry Song
Date: Tue Jan 05 2010 - 22:24:34 EST


It has been merged into mainline:

timecompare: fix half-Y2K38 problem in timecompare_update while
calculating offset
author Barry Song <21cnbao@xxxxxxxxx>
Wed, 16 Dec 2009 00:45:34 +0000 (16:45 -0800)
committer Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Wed, 16 Dec 2009 15:19:57 +0000 (07:19 -0800)
commit f065f41f48569122b5bcddbd1ba2354f7cc29fdc
tree 68606305bfb3aba16437017e0596ccae11e6f6db tree | snapshot
parent 4365a5676fa3aa1d5ae6c90c22a0044f09ba584e commit | diff
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@xxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Patrick Ohly <patrick.ohly@xxxxxxxxx>
Cc: David S. Miller <davem@xxxxxxxxxxxxx>
Cc: John Stultz <johnstul@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>


On Wed, Jan 6, 2010 at 3:28 AM, Mike Frysinger <vapier.adi@xxxxxxxxx> wrote:
> On Tue, Sep 29, 2009 at 21:44, Mike Frysinger wrote:
>> On Mon, Sep 28, 2009 at 06:16, Barry Song wrote:
>>> 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.
>>
>> Barry: you forgot to include your s-o-b tag ...
>
> you still need to post your s-o-b if we want this to go any further
> -mike
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/