Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1238613 > unrolled thread
| Started by | tip-bot for John Stultz <tipbot@zytor.com> |
|---|---|
| First post | 2015-10-02 23:00 +0200 |
| Last post | 2015-10-02 23:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[tip:timers/urgent] clocksource: Fix abs() usage w/ 64bit values tip-bot for John Stultz <tipbot@zytor.com> - 2015-10-02 23:00 +0200
| From | tip-bot for John Stultz <tipbot@zytor.com> |
|---|---|
| Date | 2015-10-02 23:00 +0200 |
| Subject | [tip:timers/urgent] clocksource: Fix abs() usage w/ 64bit values |
| Message-ID | <qffAR-6a6-3@gated-at.bofh.it> |
Commit-ID: 67dfae0cd72fec5cd158b6e5fb1647b7dbe0834c
Gitweb: http://git.kernel.org/tip/67dfae0cd72fec5cd158b6e5fb1647b7dbe0834c
Author: John Stultz <john.stultz@linaro.org>
AuthorDate: Mon, 14 Sep 2015 18:05:20 -0700
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 2 Oct 2015 22:53:01 +0200
clocksource: Fix abs() usage w/ 64bit values
This patch fixes one cases where abs() was being used with 64-bit
nanosecond values, where the result may be capped at 32-bits.
This potentially could cause watchdog false negatives on 32-bit
systems, so this patch addresses the issue by using abs64().
Signed-off-by: John Stultz <john.stultz@linaro.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1442279124-7309-2-git-send-email-john.stultz@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/time/clocksource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 841b72f..3a38775 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -217,7 +217,7 @@ static void clocksource_watchdog(unsigned long data)
continue;
/* Check the deviation from the watchdog clocksource. */
- if ((abs(cs_nsec - wd_nsec) > WATCHDOG_THRESHOLD)) {
+ if (abs64(cs_nsec - wd_nsec) > WATCHDOG_THRESHOLD) {
pr_warn("timekeeping watchdog: Marking clocksource '%s' as unstable because the skew is too large:\n",
cs->name);
pr_warn(" '%s' wd_now: %llx wd_last: %llx mask: %llx\n",
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web