summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@libc.org>2016-04-25 03:01:18 +0000
committerRich Felker <dalias@libc.org>2016-06-08 00:36:07 +0000
commit10a0ef14ec8273418a8f1d7839c4e8173fb37ba3 (patch)
tree38d0c8f4174c8bc4918ff7eef0c3302e675b9abd
parent2d1c153671cb7cf8c3a70d0759d97ea7edb49235 (diff)
downloadlinux-sh-j2-devel.tar.gz
futex: fix shared futex operations on nommuj2-devel
The shared get_futex_key code does not work on nommu, but is not needed anyway because it's impossible for a given backing to have multiple distinct virtual addresses on nommu. Simply disable these code paths by refraining from setting FLAG_SHARED when CONFIG_MMU is not enabled. Signed-off-by: Rich Felker <dalias@libc.org>
-rw-r--r--kernel/futex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index ee25f5ba4aca..46cc0a72a97f 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -3150,8 +3150,10 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
int cmd = op & FUTEX_CMD_MASK;
unsigned int flags = 0;
+#ifdef CONFIG_MMU
if (!(op & FUTEX_PRIVATE_FLAG))
flags |= FLAGS_SHARED;
+#endif
if (op & FUTEX_CLOCK_REALTIME) {
flags |= FLAGS_CLOCKRT;