Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751951AbbLMNvr (ORCPT ); Sun, 13 Dec 2015 08:51:47 -0500 Received: from down.free-electrons.com ([37.187.137.238]:57972 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751666AbbLMNvq (ORCPT ); Sun, 13 Dec 2015 08:51:46 -0500 Date: Sun, 13 Dec 2015 14:51:31 +0100 From: Alexandre Belloni To: Sasha Levin Cc: a.zummo@towertech.it, rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] rtc: fix overflow and incorrect calculation in rtc_time64_to_tm Message-ID: <20151213135131.GC11209@piout.net> References: <1449201674-24344-1-git-send-email-sasha.levin@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1449201674-24344-1-git-send-email-sasha.levin@oracle.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 807 Lines: 21 On 03/12/2015 at 23:01:14 -0500, Sasha Levin wrote : > At some point after humans go extinct and robots cotrol the world, dividing > he time64_t by 86400 to extract the days will overflow a 32bit integer, > leading to incorrect conversion into rtc_time in rtc_time64_to_tm(). > > Signed-off-by: Sasha Levin > --- > drivers/rtc/rtc-lib.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/