Skip to content
Commit 74609f45 authored by Tony Breeds's avatar Tony Breeds Committed by Paul Mackerras
Browse files

[POWERPC] Fix VDSO gettimeofday() when called with NULL struct timeval



Consider the prototype for gettimeofday():
	int gettimofday(struct timeval *tv, struct timezone *tz);

Although it is valid to call with /either/ tv or tz being NULL, and
the C version of sys_gettimeofday() supports this, the current version
of gettimeofday() in the VDSO will SEGV if called with a NULL tv.

This adds a check for tv being NULL so that it doesn't SEGV.

Signed-off-by: default avatarTony Breeds <tony@bakeyournoodle.com>
Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent ca74c013
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment