lib/vdso/32: Remove inconsistent NULL pointer checks
authorThomas Gleixner <tglx@linutronix.de>
Sun, 28 Jul 2019 13:12:52 +0000 (15:12 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 30 Jul 2019 22:09:09 +0000 (00:09 +0200)
commita9446a906f52292c52ecbd5be78eaa4d8395756c
tree4790fb898f84c8ab47afcc3172e6a523fb0f8d29
parent629f8205a6cc63d2e8e30956bad958a3507d018f
lib/vdso/32: Remove inconsistent NULL pointer checks

The 32bit variants of vdso_clock_gettime()/getres() have a NULL pointer
check for the timespec pointer. That's inconsistent vs. 64bit.

But the vdso implementation will never be consistent versus the syscall
because the only case which it can handle is NULL. Any other invalid
pointer will cause a segfault. So special casing NULL is not really useful.

Remove it along with the superflouos syscall fallback invocation as that
will return -EFAULT anyway. That also gets rid of the dubious typecast
which only works because the pointer is NULL.

Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Andy Lutomirski <luto@kernel.org>
Link: https://lkml.kernel.org/r/20190728131648.587523358@linutronix.de
lib/vdso/gettimeofday.c