Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp11342pxb; Fri, 15 Jan 2021 04:37:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0bb3S84hHKzHSNWfcbTnCPDDQT6uACPNZ3ORY2xxY/eRFSSA1Oluu51+XnT8rY40FYtBq X-Received: by 2002:a17:907:3e27:: with SMTP id hp39mr4251466ejc.187.1610714253696; Fri, 15 Jan 2021 04:37:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610714253; cv=none; d=google.com; s=arc-20160816; b=AK/nM5XC4scLFt9ADPHPtvXf1qPHnzVckjaiVn4BBJZn7d1+nxdJTRmW2ol/gXG7Id XMGJ/v2m2+t9nZKD0As5qb/V5iRappOmf9iiX5xKRSbsDI896GbxXUA3tnSTQq+fh0ZU AMo0ZBgW4ASY8PtzfsPOOzrf6mQz1ccpQIZ3SVrXxNNMotLg5HwWdANVbvihTPaS+w04 /W9Z7Rsk2M8gQ5yCrleacafdESjyvMaNGp2rSYUGGPpRADMZxrFZTfedD9NFhgABrtm8 WplrQJ441m4bs3sQxSl+Swb/oM9SgLZ20YrG3ExzOponG9ub/WNCKbJZntDUZXHDLsTw ngNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6nNHPrgXDeIHX00K8PpG/i6FJLmqF+uQMzZDVjGxmZc=; b=mffFm05XNZnsiK1y9v6adyUzt5Lxoh5ZIwNNr75/fH+rBiRE17COoEseMI9OnTvf62 nmER0nDZBZYRn/h5HN8xkACQKZa9Pk4FCydIvAT6j7132qVmQK6eTZhYqUv6TDnq2XNt Z7mJWmeBmpJgmULa+rM1HRRGsgcI4B9StQHO2B9kZX5FJ3+3o7sMwwfWwR4NBWSPgx1v cVzGmeMQe4P5ieC528gkkAw7EyVhN7xcxdBUtI0alWXT8E3t+PZCXZc/3MI07eHe21si 4h/VZQ/AOtzg2sLHxdX0QnTxtorxKTOfG5+rPTmBRHZ2+4m/5MzJFAH29vvPbwJH2/Sh gBZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2ib1pNHZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si4441705edx.584.2021.01.15.04.37.09; Fri, 15 Jan 2021 04:37:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2ib1pNHZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387580AbhAOMfN (ORCPT + 99 others); Fri, 15 Jan 2021 07:35:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:42080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730727AbhAOMfB (ORCPT ); Fri, 15 Jan 2021 07:35:01 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A8FD4223E0; Fri, 15 Jan 2021 12:34:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610714061; bh=74DnXYi3dJKiO9/TTjPEXWKdhmw8xpPkv/GNiT1DeLY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2ib1pNHZJt5f8y4k0NmzL4pm5LJ+JANchcEKtHK5DimjzHJurgq+M50NeU1ay9lv2 IhPe96uWe2tSZ4IxXH8ntuc+QGOQwbqJ+4B+5LIuJwZKJKvbpjOQMNzUBDC0G6+hZO 8nbJqhXnIauQc694USwtiG3Dd7OpQTxtd7iVRJOM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Valdis Kletnieks Subject: [PATCH 5.4 29/62] exfat: Month timestamp metadata accidentally incremented Date: Fri, 15 Jan 2021 13:27:51 +0100 Message-Id: <20210115121959.811767878@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210115121958.391610178@linuxfoundation.org> References: <20210115121958.391610178@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Valdis Klētnieks" The staging/exfat driver has departed, but a lot of distros are still tracking 5.4-stable, so we should fix this. There was an 0/1 offset error in month handling for file metadata, causing the month to get incremented on each reference to the file. Thanks to Sebastian Gurtler for troubleshooting this, and Arpad Mueller for bringing it to my attention. Relevant discussions: https://bugzilla.kernel.org/show_bug.cgi?id=210997 https://bugs.launchpad.net/ubuntu/+source/ubuntu-meta/+bug/1872504 Signed-off-by: Valdis Kletnieks Signed-off-by: Greg Kroah-Hartman --- drivers/staging/exfat/exfat_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -59,7 +59,7 @@ static void exfat_write_super(struct sup /* Convert a FAT time/date pair to a UNIX date (seconds since 1 1 70). */ static void exfat_time_fat2unix(struct timespec64 *ts, struct date_time_t *tp) { - ts->tv_sec = mktime64(tp->Year + 1980, tp->Month + 1, tp->Day, + ts->tv_sec = mktime64(tp->Year + 1980, tp->Month, tp->Day, tp->Hour, tp->Minute, tp->Second); ts->tv_nsec = tp->MilliSecond * NSEC_PER_MSEC;