[RFC][PATCH 0/2] Fix for settimeofday() error checking regression

From: John Stultz
Date: Tue May 31 2016 - 17:32:35 EST

As reported by Mika Westerberg here:

A regression in the settimeofday error checking snuck in via
86d3473224b0 ("time: Introduce do_sys_settimeofday64()"),
effecting cases where the timeval is null but the timezone
was set.

This patchset contains my proposed fix and an addition to
the kselftests to add checks for this case.

Testing/feedback would be greatly appreciated!


Cc: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
Cc: Baolin Wang <baolin.wang@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Shuah Khan <shuahkh@xxxxxxxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Richard Cochran <richardcochran@xxxxxxxxx>
Cc: Prarit Bhargava <prarit@xxxxxxxxxx>

John Stultz (2):
time: Fix problematic change in settimeofday error checking
kselftests: timers: Add set-tz test case

include/linux/timekeeping.h | 3 +
tools/testing/selftests/timers/Makefile | 3 +-
tools/testing/selftests/timers/set-tz.c | 119 ++++++++++++++++++++++++++++++++
3 files changed, 124 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/timers/set-tz.c