Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1387045
| From | Rich Felker <dalias@libc.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] futex: fix shared futex operations on nommu |
| Date | 2016-04-26 03:10 +0200 |
| Message-ID | <rrZFL-7e1-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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>
---
kernel/futex.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/futex.c b/kernel/futex.c
index a5d2e74..ed6f475 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -3131,8 +3131,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;
--
2.8.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] futex: fix shared futex operations on nommu Rich Felker <dalias@libc.org> - 2016-04-26 03:10 +0200
Re: [PATCH] futex: fix shared futex operations on nommu Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-04-26 12:00 +0200
Re: [PATCH] futex: fix shared futex operations on nommu Rich Felker <dalias@libc.org> - 2016-04-26 18:00 +0200
Re: [PATCH] futex: fix shared futex operations on nommu Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-04-26 18:20 +0200
Re: [PATCH] futex: fix shared futex operations on nommu Rich Felker <dalias@libc.org> - 2016-04-26 18:30 +0200
Re: [PATCH] futex: fix shared futex operations on nommu Andrew Morton <akpm@linux-foundation.org> - 2016-04-27 00:30 +0200
Re: [PATCH] futex: fix shared futex operations on nommu Rich Felker <dalias@libc.org> - 2016-04-27 00:40 +0200
Re: [PATCH] futex: fix shared futex operations on nommu Thomas Gleixner <tglx@linutronix.de> - 2016-04-27 15:50 +0200
csiph-web