Re: [PATCH] ntp:Fix second_overflow's input parameter type

From: John Stultz
Date: Wed Dec 16 2015 - 01:12:37 EST


On Sat, Dec 12, 2015 at 8:26 PM, DengChao <chao.deng@xxxxxxxxxx> wrote:
> The function "second_overflow" uses "unsign long"
> as its input parameter type which will overflow after
> year 2106 on 32bit systems.
> Replace it with time64_t type.
> Because 64-bit division is expensive, since "next_ntp_leap_sec"
> has been calculated already, we can just re-use it in the
> TIME_INS/DEL cases instead of re-doing divsion which may occur
> once a second.
> Signed-off-by: DengChao <chao.deng@xxxxxxxxxx>

Queued for testing. I reworded the commit message a bit too.

thanks
-john
--
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/