FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

LinkBack Thread Tools
Old 03-09-2010, 03:19 PM
Colin Ian King
Default softlockup: stop softlockup messages due to touch_ts math overflow

Ensure math does not overflow when touch_ts is close to the upper
bounds. This occurs when the top 32 bits of the TSC reach 0xffffffff
causing additions to touch_ts to overflow and this in turn generates
spurious softlockup warnings.

While this normally does not happen (since it requires an uptime of
possibly thousands of years, it may happen if the TSC warps during S3).

Signed-off-by: Colin Ian King <colin.king@canonical.com>
kernel/softlockup.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index 0d4c789..463652e 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -155,11 +155,13 @@ void softlockup_tick(void)
* Wake up the high-prio watchdog task twice per
* threshold timespan.
- if (now > touch_ts + softlockup_thresh/2)
+ if ((unsigned long long)now >
+ (unsigned long long)touch_ts + softlockup_thresh/2)
wake_up_process(per_cpu(softlockup_watchdog, this_cpu));

/* Warn about unreasonable delays: */
- if (now <= (touch_ts + softlockup_thresh))
+ if ((unsigned long long)now <=
+ ((unsigned long long)touch_ts + softlockup_thresh))

per_cpu(softlockup_print_ts, this_cpu) = touch_ts;

Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

kernel-team mailing list


Thread Tools

All times are GMT. The time now is 03:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org