A set of locking related fixes and updates:

  - Two fixes for the futex syscall related to the timeout handling.

    FUTEX_LOCK_PI does not support the FUTEX_CLOCK_REALTIME bit and because
    it's not set the time namespace adjustment for clock MONOTONIC is
    applied wrongly.

    FUTEX_WAIT cannot support the FUTEX_CLOCK_REALTIME bit because its
    always a relative timeout.

  - Cleanups in the futex syscall entry points which became obvious when
    the two timeout handling bugs were fixed.

  - Cleanup of queued_write_lock_slowpath() as suggested by Linus

  - Fixup of the smp_call_function_single_async() prototype
futex: Make syscall entry points less convoluted

The futex and the compat syscall entry points do pretty much the same
except for the timespec data types and the corresponding copy from
user function.

Split out the rest into inline functions and share the functionality.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210422194705.244476369@linutronix.de

1 file changed