Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751520AbbLMEYo (ORCPT ); Sat, 12 Dec 2015 23:24:44 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:35513 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbbLMEYm (ORCPT ); Sat, 12 Dec 2015 23:24:42 -0500 From: DengChao To: linux-kernel@vger.kernel.org, tglx@linutronix.de, john.stultz@linaro.org Cc: chao.deng@linaro.org Subject: [PATCH 0/2] ntp:Change the type of time_reftime and replace get_seconds() Date: Sun, 13 Dec 2015 12:24:17 +0800 Message-Id: <1449980659-2948-1-git-send-email-chao.deng@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The type of ntp static variant "time_reftime" and the type of get_seconds()'s return value are both unsign long now, which may cause y2038 problem on 32bit systems. So change time_reftime' type to time64_t, and replace get_seconds with ktime_get_real_seconds() in ntp. ktime_get_real_seconds() does the same thing as get_seconds() and is y2038 safe, but ktime_get_real_seconds holds the timekeeping lock which is also held by the ntp code. We need timekeeping to provide a none lock version of ktime_get_real_seconds before we can start to solve the ntp.c's y2038 problem. The [PATCH 1/2] provides the internal none lock version function. The [PATCH 2/2] does the real fix. DengChao (2): timekeeping: Provide internal function __ktime_get_real_seconds ntp:Change the type of time_reftime to time64_t and replace get_seconds with __ktime_get_real_seconds kernel/time/ntp.c | 10 ++++++---- kernel/time/timekeeping.c | 13 +++++++++++++ kernel/time/timekeeping_internal.h | 2 ++ 3 files changed, 21 insertions(+), 4 deletions(-) -- 1.9.1