aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/ntp.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-01-26 18:48:08 -0500
committerDave Airlie <airlied@redhat.com>2015-01-26 18:48:08 -0500
commit22cbbceff65cb03ee37495b52f360809fa439293 (patch)
tree59ee71a72328743242a2357b0a0af8697d1640e4 /kernel/time/ntp.c
parent104b61590dcd5f71ff518e2b820e1cdf9d0350f2 (diff)
parent26bc420b59a38e4e6685a73345a0def461136dce (diff)
Merge tag 'v3.19-rc6' into drm-fixes
Linux 3.19-rc6 pull in rc6 as the amdkfd fixes are based on it, and I'd rather be doing the merges separately
Diffstat (limited to 'kernel/time/ntp.c')
-rw-r--r--kernel/time/ntp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 87a346fd6d61..28bf91c60a0b 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -633,6 +633,13 @@ int ntp_validate_timex(struct timex *txc)
633 if ((txc->modes & ADJ_SETOFFSET) && (!capable(CAP_SYS_TIME))) 633 if ((txc->modes & ADJ_SETOFFSET) && (!capable(CAP_SYS_TIME)))
634 return -EPERM; 634 return -EPERM;
635 635
636 if (txc->modes & ADJ_FREQUENCY) {
637 if (LONG_MIN / PPM_SCALE > txc->freq)
638 return -EINVAL;
639 if (LONG_MAX / PPM_SCALE < txc->freq)
640 return -EINVAL;
641 }
642
636 return 0; 643 return 0;
637} 644}
638 645