Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca48e5d8 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Alistair Delva
Browse files

UPSTREAM: lib/vdso: Make clock_getres() POSIX compliant again



A recent commit removed the NULL pointer check from the clock_getres()
implementation causing a test case to fault.

POSIX requires an explicit NULL pointer check for clock_getres() aside of
the validity check of the clock_id argument for obscure reasons.

Add it back for both 32bit and 64bit.

Note, this is only a partial revert of the offending commit which does not
bring back the broken fallback invocation in the the 32bit compat
implementations of clock_getres() and clock_gettime().

Fixes: a9446a906f52 ("lib/vdso/32: Remove inconsistent NULL pointer checks")
Reported-by: default avatarAndreas Schwab <schwab@linux-m68k.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Tested-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1910211202260.1904@nanos.tec.linutronix.de


(cherry picked from commit 1638b8f096ca165965189b9626564c933c79fe63)
Signed-off-by: default avatarMark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I3a157d989ec54577781742d69380261bc4279676
parent 28652a9b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment