From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 241A6C433F5 for ; Sun, 6 Feb 2022 13:08:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238263AbiBFNIx (ORCPT ); Sun, 6 Feb 2022 08:08:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236193AbiBFNIx (ORCPT ); Sun, 6 Feb 2022 08:08:53 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 599B1C043183; Sun, 6 Feb 2022 05:08:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1CA0FB80DDE; Sun, 6 Feb 2022 13:08:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26B5EC340E9; Sun, 6 Feb 2022 13:08:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644152929; bh=NJwkVx1BYFnujt35nsRPmcUotkHAK6EbP1163UXtC0A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CSDu70HSCHuZva1Acikr0WcV4zSg8lzDkItBBbQOJjdqCFe0+OiND8guHb0HqBsAc +YoxOi0HwY75+02hhPNg9qNmutm08R0/5CrtUYML8Np0hpGctYtClTRmI+yfazpKE0 Pjb6Wn5U2Wra8Zwwh/su9VBBwvwEXyTTOPXiynW0= Date: Sun, 6 Feb 2022 14:07:16 +0100 From: Greg KH To: Mateusz =?utf-8?Q?Jo=C5=84czyk?= Cc: stable@vger.kernel.org, linux-rtc@vger.kernel.org, Riwen Lu , Eric Wong , Alexandre Belloni Subject: Re: [PATCH] rtc: cmos: Evaluate century appropriate Message-ID: References: <20220205221139.5557-1-mat.jonczyk@o2.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220205221139.5557-1-mat.jonczyk@o2.pl> Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org On Sat, Feb 05, 2022 at 11:11:39PM +0100, Mateusz Jończyk wrote: > From: Riwen Lu > > commit ff164ae39b82ee483b24579c8e22a13a8ce5bd04 upstream. > > There's limiting the year to 2069. When setting the rtc year to 2070, > reading it returns 1970. Evaluate century starting from 19 to count the > correct year. > > $ sudo date -s 20700106 > Mon 06 Jan 2070 12:00:00 AM CST > $ sudo hwclock -w > $ sudo hwclock -r > 1970-01-06 12:00:49.604968+08:00 > > Fixes: 2a4daadd4d3e5071 ("rtc: cmos: ignore bogus century byte") > > Signed-off-by: Riwen Lu > Acked-by: Eric Wong > Reviewed-by: Mateusz Jończyk > Signed-off-by: Alexandre Belloni > Link: https://lore.kernel.org/r/20220106084609.1223688-1-luriwen@kylinos.cn > Signed-off-by: Mateusz Jończyk # preparation for stable > --- > drivers/rtc/rtc-mc146818-lib.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Hello, > > I have prepared this patch for inclusion into stable. Run-tested on top > of 5.16.7 and 4.9.299, works as intended. Now queued up, thanks. greg k-h