um: Skip futex_atomic_cmpxchg_inatomic() test
authorRichard Weinberger <richard@nod.at>
Wed, 10 Dec 2014 12:53:51 +0000 (13:53 +0100)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:06:05 +0000 (13:06 +0000)
commit f911d731054ab3d82ee72a16b889e17ca3a2332a upstream.

futex_atomic_cmpxchg_inatomic() does not work on UML because
it triggers a copy_from_user() in kernel context.
On UML copy_from_user() can only be used if the kernel was called
by a real user space process such that UML can use ptrace()
to fetch the value.

Reported-by: Miklos Szeredi <miklos@szeredi.hu>
Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Tested-by: Daniel Walter <d.walter@0x90.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/um/Kconfig.common

index bceee6623b00134023918cd5b62ec6144e3c66eb..d1ff46c0559bb50c6b42e46a709d6291fabb73f4 100644 (file)
@@ -8,6 +8,7 @@ config UML
        default y
        select HAVE_GENERIC_HARDIRQS
        select HAVE_UID16
+       select HAVE_FUTEX_CMPXCHG if FUTEX
        select GENERIC_IRQ_SHOW
        select GENERIC_CPU_DEVICES
        select GENERIC_IO