diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index c5e0cba3b39cc12c5b6ef2f12c04395123e999c6..d943d6773b3f579880ccd234e47dcdadce0a6c61 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -686,6 +686,8 @@ static inline void process_adjtimex_modes(const struct timex *txc, s32 *time_tai if (txc->modes & ADJ_MAXERROR) time_maxerror = txc->maxerror; + if (time_maxerror > NTP_PHASE_LIMIT) + time_maxerror = NTP_PHASE_LIMIT; if (txc->modes & ADJ_ESTERROR) time_esterror = txc->esterror;