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

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

UPSTREAM: 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: default avatarThomas Gleixner <tglx@linutronix.de>
Tested-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: default avatarAndy Lutomirski <luto@kernel.org>
Link: https://lkml.kernel.org/r/20190728131648.587523358@linutronix.de


(cherry picked from commit a9446a906f52292c52ecbd5be78eaa4d8395756c)
Signed-off-by: default avatarMark Salyzyn <salyzyn@google.com>
Bug: 154668398
Change-Id: I2d4563f336f8cc6b44f1b74f92467c4c6a579710
parent 941fb316
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