From patchwork Tue Nov 19 05:19:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 179630 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp145683ilf; Mon, 18 Nov 2019 21:22:28 -0800 (PST) X-Google-Smtp-Source: APXvYqxA59DA3S8YPHm+Uyg5onQODB7+aC4LqiScnNREGJT/TYpH+jnhxGRlHXyhYwu6TB2fEx2I X-Received: by 2002:a17:906:c2d6:: with SMTP id ch22mr32962121ejb.262.1574140948717; Mon, 18 Nov 2019 21:22:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574140948; cv=none; d=google.com; s=arc-20160816; b=laZQMr/Hqd4PFJlI/rSUky5H7AUggBf9Uwl1otgPwgnF2Lad3bbPOMuMnj69fP3g4d OD1FqLvjTyy7PZxCqqZsU5q2EUdmdIn9+FAaZ51+CL+4iFm4LkWUH9MII9cE6MNEEaY9 LpXJPTph9I2JM/w1WOWuSEDebS3I+92Y1QHJJA9iYgZnFzrDWkIC3rruRwMKALG5WA/R BfwjIZwKRi5IaZ6SesxQFsQPQeLaylZ8EH47LTpHifvbKTE/Br/Y1JjJxOr8Hdp+ifNc ybbHcFmOVJioWFcXGt3YTZo2VZ2kd+wkAjxexFsmd5fCbX2ChC8BRqqPMKlRJapKgF4e 3WiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UBzndSrS5x73r2IvMPVX2jqmHnliGTxigd8sh3+b48I=; b=MJr08pN1gMbODfB96EDLIKabR/lV7mucPai8RhT49axtBpCmLTwW7ByGRydL7wkvpF ZSJMCESWw7IOxB16ODMUf+sJ4o5NF3huVtAFBku4PsY8+41L7ZTfApEQrIaCsnse9Jdi HE3nM2Ku5AOMs7pwgrnATrWwfvjXm678OoErk9i/B+zSB727Ijh7TfcpBJqbQTJU6uld XyDOyfai7wFhg8M5DQ2ktC2nbBoBcx4A6K82c0AJN+dexwmh0h1r8kYN5i7ERkx2y1w6 uekOssV5Sg/rZ3YLClhKnqrGHproToKyODwpAqRl6qFigbBn09XnpEJH+ZYMBltNgnSm p5FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Vos8Duf1; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1si14034124edm.57.2019.11.18.21.22.28; Mon, 18 Nov 2019 21:22:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Vos8Duf1; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727740AbfKSFW1 (ORCPT + 15 others); Tue, 19 Nov 2019 00:22:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:37758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727736AbfKSFW0 (ORCPT ); Tue, 19 Nov 2019 00:22:26 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C444121939; Tue, 19 Nov 2019 05:22:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574140946; bh=qhjc3em040Ekybk+oPPE0CRElY/YwmptLb2RMbz5b94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vos8Duf10v0ZOXfPiVPqT1uRGRPyyuk1H7S+SrRGTffQ0e7pFJp22M8jHKjOXiC1w nW01Ep+mxA2Kzx0DNfTotBnclHqyNNcM3wPu0EeBUIHK6IAQfU2v0xz3iGIJkyrIeH D9RYE/4AcHqAhiEScz7iJ0zvtdo1YiP9vMecjYIs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Thomas Gleixner Subject: [PATCH 5.3 39/48] ntp/y2038: Remove incorrect time_t truncation Date: Tue, 19 Nov 2019 06:19:59 +0100 Message-Id: <20191119051022.161704534@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119050946.745015350@linuxfoundation.org> References: <20191119050946.745015350@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann commit 2f5841349df281ecf8f81cc82d869b8476f0db0b upstream. A cast to 'time_t' was accidentally left in place during the conversion of __do_adjtimex() to 64-bit timestamps, so the resulting value is incorrectly truncated. Remove the cast so the 64-bit time gets propagated correctly. Fixes: ead25417f82e ("timex: use __kernel_timex internally") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20191108203435.112759-2-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman --- kernel/time/ntp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -771,7 +771,7 @@ int __do_adjtimex(struct __kernel_timex /* fill PPS status fields */ pps_fill_timex(txc); - txc->time.tv_sec = (time_t)ts->tv_sec; + txc->time.tv_sec = ts->tv_sec; txc->time.tv_usec = ts->tv_nsec; if (!(time_status & STA_NANO)) txc->time.tv_usec = ts->tv_nsec / NSEC_PER_USEC;