linux-stable/kernel/futex
Linus Torvalds 32913f3482 futex: fix user access on powerpc
The powerpc user access code is special, and unlike other architectures
distinguishes between user access for reading and writing.

And commit 43a43faf53 ("futex: improve user space accesses") messed
that up.  It went undetected elsewhere, but caused ppc32 to fail early
during boot, because the user access had been started with
user_read_access_begin(), but then finished off with just a plain
"user_access_end()".

Note that the address-masking user access helpers don't even have that
read-vs-write distinction, so if powerpc ever wants to do address
masking tricks, we'll have to do some extra work for it.

[ Make sure to also do it for the EFAULT case, as pointed out by
  Christophe Leroy ]

Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/all/87bjxl6b0i.fsf@igel.home/
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-09 10:00:25 -08:00
..
core.c futex: improve user space accesses 2024-11-25 12:11:55 -08:00
futex.h futex: fix user access on powerpc 2024-12-09 10:00:25 -08:00
Makefile futex: Split out wait/wake 2021-10-07 13:51:11 +02:00
pi.c locking/mutex: Remove wakeups from under mutex::wait_lock 2024-10-14 12:52:40 +02:00
requeue.c plist: Split out plist_types.h 2023-12-20 19:26:31 -05:00
syscalls.c futex: make futex_parse_waitv() available as a helper 2023-09-29 02:37:05 -06:00
waitwake.c plist: Split out plist_types.h 2023-12-20 19:26:31 -05:00