]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit63066cc29761439c5a48b84106b21a741b0baf28
tree4790fb898f84c8ab47afcc3172e6a523fb0f8d29
parent965a5841eeb0d65da298b42700b0e64f25c0aff9
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: 77726c614aab ("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