diff options
author | John Stultz <john.stultz@linaro.org> | 2013-03-22 19:08:52 (GMT) |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2013-04-04 20:18:14 (GMT) |
commit | e4085693f629ded8ac8c35b5cdd324d20242990b (patch) | |
tree | 757707d15089ed0386b7f25bfa019cdfe9b44024 /kernel/time/timekeeping.c | |
parent | aa6f9c595d857328e5d815e5b94c0e7cd31a6b59 (diff) | |
download | linux-fsl-qoriq-e4085693f629ded8ac8c35b5cdd324d20242990b.tar.xz |
ntp: Move timex validation to timekeeping do_adjtimex call.
Move logic that does not need the ntp state to be done
in the timekeeping do_adjtimex() call.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel/time/timekeeping.c')
-rw-r--r-- | kernel/time/timekeeping.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index a138ec2..f6c8a72 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1618,6 +1618,13 @@ EXPORT_SYMBOL_GPL(ktime_get_monotonic_offset); */ int do_adjtimex(struct timex *txc) { + int ret; + + /* Validate the data before disabling interrupts */ + ret = ntp_validate_timex(txc); + if (ret) + return ret; + return __do_adjtimex(txc); } |