Add patch for a working NTP, suggested by @chron0

Patch from https://bugzilla.redhat.com/show_bug.cgi?id=1188074#c3
This commit is contained in:
nemunaire 2015-02-07 21:04:51 +01:00
commit 11cfc5dcd0
3 changed files with 22 additions and 1 deletions

View file

@ -0,0 +1,16 @@
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 28db9be..0131530 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -632,9 +632,9 @@ int ntp_validate_timex(struct timex *txc)
return -EPERM;
if (txc->modes & ADJ_FREQUENCY) {
- if (LONG_MIN / PPM_SCALE > txc->freq)
+ if (-MAXFREQ_SCALED / PPM_SCALE > txc->freq)
return -EINVAL;
- if (LONG_MAX / PPM_SCALE < txc->freq)
+ if (MAXFREQ_SCALED / PPM_SCALE < txc->freq)
return -EINVAL;
}