From: tip-bot for Arnd Bergmann <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, rafael.j.wysocki@intel.com, arnd@arndb.de,
deepa.kernel@gmail.com, hpa@zytor.com, anna-maria@linutronix.de,
linux-kernel@vger.kernel.org, tglx@linutronix.de
Subject: [tip:timers/urgent] posix-timers: Fix nanosleep_copyout() for CONFIG_COMPAT_32BIT_TIME
Date: Tue, 19 Jun 2018 00:27:47 -0700 [thread overview]
Message-ID: <tip-0fe2795516b9e1c59b58b02bdf8658698117ec4e@git.kernel.org> (raw)
In-Reply-To: <20180618140811.2998503-1-arnd@arndb.de>
Commit-ID: 0fe2795516b9e1c59b58b02bdf8658698117ec4e
Gitweb: https://git.kernel.org/tip/0fe2795516b9e1c59b58b02bdf8658698117ec4e
Author: Arnd Bergmann <arnd@arndb.de>
AuthorDate: Mon, 18 Jun 2018 16:07:59 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 19 Jun 2018 09:23:19 +0200
posix-timers: Fix nanosleep_copyout() for CONFIG_COMPAT_32BIT_TIME
Commit b5793b0d92c9 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 any architecture is switched over to
use it.
Use the proper config symbol to enable the code path.
Fixes: Commit b5793b0d92c9 ("posix-timers: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: y2038@lists.linaro.org
Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>
Cc: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Link: https://lkml.kernel.org/r/20180618140811.2998503-1-arnd@arndb.de
---
kernel/time/hrtimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
prev parent reply other threads:[~2018-06-19 7:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-18 14:07 [PATCH 1/3] posix-timers: fix nanosleep_copyout() for CONFIG_COMPAT_32BIT_TIME Arnd Bergmann
2018-06-18 14:08 ` [PATCH 2/3] time: use ktime_get_real_seconds() in time syscall Arnd Bergmann
2018-06-19 8:00 ` [tip:timers/core] time: Use " tip-bot for Arnd Bergmann
2018-06-18 14:08 ` [PATCH 3/3] timekeeping: use ktime_get_real_ts64() instead of getnstimeofday64() Arnd Bergmann
2018-06-19 8:01 ` [tip:timers/core] timekeeping: Use " tip-bot for Arnd Bergmann
2018-06-19 7:27 ` tip-bot for Arnd Bergmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-0fe2795516b9e1c59b58b02bdf8658698117ec4e@git.kernel.org \
--to=tipbot@zytor.com \
--cc=anna-maria@linutronix.de \
--cc=arnd@arndb.de \
--cc=deepa.kernel@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).