lkml.org 
[lkml]   [2019]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [patch 1/5] lib/vdso/32: Remove inconsistent NULL pointer checks
On Sun, Jul 28, 2019 at 6:20 AM Thomas Gleixner <tglx@linutronix.de> wrote:
>
> 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.

Reviewed-by: Andy Lutomirski <luto@kernel.org>

FWIW, the equivalent change to gettimeofday would be an ABI break,
since we historically have that check, and it even makes sense there.

\
 
 \ /
  Last update: 2019-07-28 16:34    [W:0.185 / U:4.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site