From patchwork Mon Nov 11 20:16:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 179139 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7148759ilf; Mon, 11 Nov 2019 12:22:24 -0800 (PST) X-Google-Smtp-Source: APXvYqzGgQ98Z1+P1M4wLzK2uejRwkkR9ULhqTrd8HFy+CF6MiKTaEyezOG80kmfA7Qkrr1Gh5VP X-Received: by 2002:a17:906:a388:: with SMTP id k8mr23898378ejz.223.1573503744135; Mon, 11 Nov 2019 12:22:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573503744; cv=none; d=google.com; s=arc-20160816; b=nViPAvCSkUdl3KJqoJRYGVp+P6JycbTvJbeyH3Vlgwp5nQJD0E9cod0ImpJDYBeaOF ASZn7gUBasDHksNO+QDpcmld6RVzLMk0TvBfpQhhKlweQMst2E+yLJm+Ymzz0hXO/AkU plxOPLP/IiY8i/BvMg7jO5r91hZSbREWJTKJHuQlDy0UtiCqyfOXWcSdPITj88QrK77G L3cp36y7VAkhJECkz9rLyPHsUSm2eaJ2lOcxLSPO8dNj6LklEUhMiY5P6wcLwhhuVS7H lU6CTq45U1dQEJ+a1aM0KamthqiPfx6eJpXk7U0EpWIK0iOL6cmmS9z4qorxw6cW3R1h EXtg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=MAnuPeH8MQ7Zv2N6hh8mt/CD+gsk+ZTHINwLn0K3ukg=; b=R+s4Y0h2RdvY6Ef3d2q4+tq/MJWW0TWvOaTN8FV4imAr7JeWEKXhCf6wFFDNmbw2K9 rHyYAMzxjIX1QDBI85XB481DybIQE52Uq3bLjsK1Dyc3R5GCl2Ha+QtM5iBaQjSG8oAa UrNMvs8cy3zIr5z82XCK1x0QTcU1QkXG5adQB9vDaNLdin3PwybQxl7K2NvYmnF6SV1R 8PN/IffpBQBBCokUNkD7GEqNimgAyN5ScQqDCcIx+TLsN6tLJsX+0b7YpTMlZBcl73+O tpFr4BsVfLG8auOFHLP03O6Vmr5/rXofyZ7W1je9WdccBHSXDr56Q/OsbLHaq1DYOy5S YZIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 bs2si10363532edb.354.2019.11.11.12.22.23; Mon, 11 Nov 2019 12:22:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727857AbfKKUWT (ORCPT + 26 others); Mon, 11 Nov 2019 15:22:19 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:42475 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727693AbfKKUWC (ORCPT ); Mon, 11 Nov 2019 15:22:02 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1N8XLj-1hqEL53gMD-014Vte; Mon, 11 Nov 2019 21:16:51 +0100 From: Arnd Bergmann To: linux-nfs@vger.kernel.org, "J. Bruce Fields" , Chuck Lever , Trond Myklebust , Anna Schumaker Cc: y2038@lists.linaro.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 14/19] nfsd: use time64_t in nfsd_proc_setattr() check Date: Mon, 11 Nov 2019 21:16:34 +0100 Message-Id: <20191111201639.2240623-15-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191111201639.2240623-1-arnd@arndb.de> References: <20191111201639.2240623-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:bZJ6dABjb/h5bnFGHvp5XdGnpOQ48DZK/y9xvfcHGKpTQoH3/bT 1UeC7EXkGuZ29jsdi41tFt6HfOuEKjy2GfgdYIX/v+IXZR1U1EcEqzS/o8ilLDIy+b9S6kr GcfvrHS9+6QfIMVctOIbx3+o1NRJAZJYtvryMigWubxt8VxFp91emStVv1L6jsg8J2tG1am HXOJqCfyLJUodT6uk5vKw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:dbRhCZ12aTc=:oN8DIUR5xf8YebZvljt4E8 jPI/c8keSlfSxzvYD/z5yoA72BNX/qGRs04Ak8r5YoeQbEnFdEyxmsWWOFzmMbEhO/5xY+twG H/iQpwPjy9TOqbZ2SDar1vulM1B0gwjZ+E/endUeaCpK6XwffIbE2qOcgrGr/uCVWjtlHZutV xMlPe4j5UUk3iCbAbFRtBovVfpWc+7x75nnMEygcuZy+DlVpkfeOLcYGKhQW6kjZgGPVu8jag 9E5OXqI9x7LAzZwMSWnqAI/Exo3vycLihrEZ7wSLEAayyQf8EtnV9tY8w+NIszevrwD10RVOG 1InLkIUpLSYaVFy0tkT7sT/kIQ5mcdnmF23o+tlySVQEbfrKeJYcSqvtJAR0dfSpMZEDA3A04 ZNgH01oG2db9GXQ7G3XIlyFZmiBh9Pw/XxlA3BVIthiktvBr7v3Pr5aFfmz9iKPtTZKR6paVW LWl+13SSBK37GAXxxt9UVwvGyE+eT0luaWfAHlwoJgf12+98EYTll+eBWZtKcxGouH6UsmArP mBFd4I7/fUqeaIr88b+aOTG00jWnVhw4XqksfWo3XoDSMnpqyfF2DSRikjv64nC6LlXllFOiB WFPKOzj6XOhVWerSKTVmbXc95MRtN/IyyaLF+2wG3TG57AFtj6b5ZGoJb2d79DY6yqQfQseJJ BZQeezjtsxE9vCZZmZbZy9rRjDqouKzKzquMSPfvyiNkoBGQ/BRAzHiixkArQ04qG7yCesSfP kqAS4UyDLfdekrxB+Zo61Gz+aoTQmpDLP1u9yqJQQYjCf00YRR39Ie+XNLuN9miN5KGcfqQ37 Kr+Fm0MMLspmle0KiTpkVRRQe5pYtLPa981QTn50S/BCs5rI5G9hnugAQivEv6Uam6wIY9LKR Z/Zx6iJNL0/SMqiwPm3A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Change to time64_t and ktime_get_real_seconds() to make the logic work correctly on 32-bit architectures beyond 2038. Signed-off-by: Arnd Bergmann --- fs/nfsd/nfsproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index aa013b736073..b25c90be29fb 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c @@ -94,7 +94,7 @@ nfsd_proc_setattr(struct svc_rqst *rqstp) * Solaris, at least, doesn't seem to care what the time * request is. We require it be within 30 minutes of now. */ - time_t delta = iap->ia_atime.tv_sec - get_seconds(); + time64_t delta = iap->ia_atime.tv_sec - ktime_get_real_seconds(); nfserr = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP); if (nfserr)