aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/time.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2012-11-19 10:26:16 -0800
committerJohn Stultz <john.stultz@linaro.org>2013-01-15 18:16:02 -0800
commit1e817fb62cd185a2232ad4302579491805609489 (patch)
treed4155fb65a9fb32cd9236405a8b7534f39c293b9 /include/linux/time.h
parentMerge branch 'fortglx/3.8/time' of git://git.linaro.org/people/jstultz/linux into timers/core (diff)
downloadlinux-dev-1e817fb62cd185a2232ad4302579491805609489.tar.xz
linux-dev-1e817fb62cd185a2232ad4302579491805609489.zip
time: create __getnstimeofday for WARNless calls
The pstore RAM backend can get called during resume, and must be defensive against a suspended time source. Expose getnstimeofday logic that returns an error instead of a WARN. This can be detected and the timestamp can be zeroed out. Reported-by: Doug Anderson <dianders@chromium.org> Cc: John Stultz <johnstul@us.ibm.com> Cc: Anton Vorontsov <anton.vorontsov@linaro.org> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'include/linux/time.h')
-rw-r--r--include/linux/time.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index 4d358e9d10f1..0015aea4c4a7 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -158,6 +158,7 @@ extern int do_setitimer(int which, struct itimerval *value,
struct itimerval *ovalue);
extern unsigned int alarm_setitimer(unsigned int seconds);
extern int do_getitimer(int which, struct itimerval *value);
+extern int __getnstimeofday(struct timespec *tv);
extern void getnstimeofday(struct timespec *tv);
extern void getrawmonotonic(struct timespec *ts);
extern void getnstime_raw_and_real(struct timespec *ts_raw,