summaryrefslogtreecommitdiff
path: root/target/linux/brcm2708/patches-3.18/0114-ntp-Patch-to-fix-false-positives-on-32bit-systems.patch
blob: 35f0e4be042e1cdec8ef4322e82d12f79b3a8d38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 89d56313537f161a0d9b3888c0f39770cbb994a7 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Sun, 8 Feb 2015 13:17:00 +0000
Subject: [PATCH 114/114] ntp: Patch to fix false positives on 32bit systems

See: https://bugzilla.kernel.org/show_bug.cgi?id=92481
---
 kernel/time/ntp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -634,9 +634,9 @@ int ntp_validate_timex(struct timex *txc
 		return -EPERM;
 
 	if (txc->modes & ADJ_FREQUENCY) {
-		if (LONG_MIN / PPM_SCALE > txc->freq)
+		if (LLONG_MIN / PPM_SCALE > txc->freq)
 			return -EINVAL;
-		if (LONG_MAX / PPM_SCALE < txc->freq)
+		if (LLONG_MAX / PPM_SCALE < txc->freq)
 			return -EINVAL;
 	}