]> git.hungrycats.org Git - linux/commit
lib/vdso: Make clock_getres() POSIX compliant again
authorThomas Gleixner <tglx@linutronix.de>
Mon, 21 Oct 2019 10:07:15 +0000 (12:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2019 08:22:36 +0000 (09:22 +0100)
commitba149e6440840acb665147b4763274eacd6c1b6f
tree4298ef49c1e4e1f8a5152a55a7448c7d4d2a0545
parentfa8ef4a0c1c9eea54113eb090c3a3dcda624039d
lib/vdso: Make clock_getres() POSIX compliant again

commit 1638b8f096ca165965189b9626564c933c79fe63 upstream.

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: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Christophe 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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/vdso/gettimeofday.c