From patchwork Mon Jun 18 14:07:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 138952 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp3998920lji; Mon, 18 Jun 2018 07:08:42 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKFAyPFoZ16A27VqaATdsJvRaGVcAxMbBrhHsFN2sh3ptTeB5L5M4e6QFhbiqENBxLQiaGn X-Received: by 2002:a17:902:4545:: with SMTP id m63-v6mr14484282pld.268.1529330922062; Mon, 18 Jun 2018 07:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529330922; cv=none; d=google.com; s=arc-20160816; b=Vwg4Y1T4G9d3OXl3Qg+911bGLdoOGHl4KKcjqMad3koNEbFRvhYZ0bfcC2fPa8Oqcl PSDhJsUlriCW0NhPfgzcsAD91AJY1QM3EUDSBBPVLdbi6Fl1zkcwBEo/fQkzrYnyPowS Rm1aTlQ/su8CO40kwnRXJ0c2gaP6mDNz5LDBJMyIrkx2iy7/dfNRnAE1bc2rCi87yPjU b8y0vfFvW6LFYeC0nYUmv4F8OVX9AA4pBsXzSGXSV17OiYcjl3S02CnTdr3RvPZOpFgO NlaR4kSOrssms2qoagloxvSqOwcFmmWqCve1wR5Cj5H99G4eyQ/Lj4xgvLLEPPYdCbVK cQJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=3jaoxA3DkYWz6WExkCMCF4kwpMHt/dCot65EJ0h5gE8=; b=reHwqlfiRAirqyi/HFOKXfNOH/xdv4nnVC32sovEHUfC6u9ZZ4h+avKtUQN0YLjTJV 88lYB2EpWD0qdmwPB8c5rQqGyKJ67FYVX1WalWWChY1syua5tBy6tlm+zcWWkPe8mZq0 3SNVyTW7OIUQZ+/6tuXd4JYBq5oFSxYD10mms/Ulm9J6TNemHGulSN2M8D0VR+oWHaKD jPma1LFLgwmfEJeAsJUJ7XcphaXBR8bpy3BhDNzqX8yWsz8/lz7UkrlzqljZO0m8n+eb ic5bOtZ/fbqOOOOAVd36Oa5Y90ylkqPFhs1m5KzZUIn9t/z8eTm5dsOnHqsIvklcUwIb Gdqg== 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 g17-v6si14607043plo.355.2018.06.18.07.08.41; Mon, 18 Jun 2018 07:08:42 -0700 (PDT) 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 S1754690AbeFROIk (ORCPT + 30 others); Mon, 18 Jun 2018 10:08:40 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:33357 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754601AbeFROIh (ORCPT ); Mon, 18 Jun 2018 10:08:37 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0Mb8iR-1fnx6y0B8l-00KekP; Mon, 18 Jun 2018 16:08:15 +0200 From: Arnd Bergmann To: Thomas Gleixner Cc: y2038@lists.linaro.org, Arnd Bergmann , Ingo Molnar , Anna-Maria Gleixner , Deepa Dinamani , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] posix-timers: fix nanosleep_copyout() for CONFIG_COMPAT_32BIT_TIME Date: Mon, 18 Jun 2018 16:07:59 +0200 Message-Id: <20180618140811.2998503-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:KWcztfOL8CF0VfxuTS9pFEZN5Pz4QPo0cxd06aMQ3S4ucXfTmnN pa6lkzGkFn4M7g3ab+oJA16LLEDrEgnYusH7pTayUomDDBrB0075pgZEaXtqO/Bq1YkyN16 2L+J+EebgME7t28FnV6NTa3NKe+tH2HdNdf8VOS0sMVEP6OBgMdNkIcPBtN5AbYPMhQVVj4 9/guOoL0Z4VcZgRJikLrQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:uct43v7Tppw=:vUicSlTQrWWgXrn4a1rmOw tEunvrSw7KawJ1wB9xCYqliIiLVQuRgjnDwSGW5bqscIi9zgkddMZNyB7raUvrQTWcbPAijM9 yx/vZ5ODUDaVa4P0eGFh8DHx5Ve9+cM5nrpyAT7L/jaOgo1/cAqbSmw9q3FXU/F/sJcsV9eul p51JovstadcnaTezWbDWD0wIbpVhvbwX4HMHGHlwnxCUsZxgFbwGJ15kMMo0aJXOqFVzQZBe4 0Ten5SF47ARRMgs0so3Yg3qyoxXHHmpZxJrMyoj08pZbCGyQOwK/+LER6rnwADg3JcSjwxbH3 x2N/ffC+5miCvSCeX63v6oZLQkZ+TR+hFtxB/PYdr22e/xdPRC6stXwOHWDQ2NLJ4ZV0BhASj FdsywdQSHDMUtdKNlt/b602nCu/IaL9noCBprzxvLBDXbrPwTgcK1HvVzCCY+QYw0keI7M1wf OScel5vMB0qaPnDXuGecM+qc4YFHPiE6IBVQYqAYg/pyIN6csU4Ug2F7GKVZ82l+g4QhEh8Dd 6+U2zH0PBZzkEspLlemxZf72V6FfiMwOHnfraLiaHCuC2L2CniPZx9OxfxTNs3KMWp77MImOV cdOB/kEWRLIUwKDl8YUXPsS/cwO1pi9yx01N+epcuc+R8Dy4dtcmI5welIBWlI2oFrzyVthzq rHW/LvQ97977KQiDMlMwFZ2u+yckpn09p950MLOZt67ilD/BBX60wkrfWAMMB8p6QStY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit b5793b0d92c9 ("posix-timers: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME") added support for building the nanosleep compat system call on 32-bit architectures, but missed one change in nanosleep_copyout(), which would trigger a BUG() as soon as we switch any architecture over to use it. This makes sure the TT_COMPAT handler is available when we need it. Signed-off-by: Arnd Bergmann --- kernel/time/hrtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 055a4a728c00..3e93c54bd3a1 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1659,7 +1659,7 @@ EXPORT_SYMBOL_GPL(hrtimer_init_sleeper); int nanosleep_copyout(struct restart_block *restart, struct timespec64 *ts) { switch(restart->nanosleep.type) { -#ifdef CONFIG_COMPAT +#ifdef CONFIG_COMPAT_32BIT_TIME case TT_COMPAT: if (compat_put_timespec64(ts, restart->nanosleep.compat_rmtp)) return -EFAULT;