From: Colin Ian King Date: Fri, 19 Mar 2010 10:28:02 +0000 (+0000) Subject: softlockup: Stop spurious softlockup messages due to overflow X-Git-Tag: firefly_0821_release~10186^2~1942 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7b6c1753bc0ee455adf4f4ed489a367c7dc7c432;p=firefly-linux-kernel-4.4.55.git softlockup: Stop spurious softlockup messages due to overflow commit 8c2eb4805d422bdbf60ba00ff233c794d23c3c00 upstream. Ensure additions on touch_ts do not overflow. This can occur 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. Signed-off-by: Colin Ian King Cc: Peter Zijlstra Cc: Eric Dumazet LKML-Reference: <1268994482.1798.6.camel@lenovo> Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/softlockup.c b/kernel/softlockup.c index 81324d12eb35..d2080ad196fd 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c @@ -140,11 +140,11 @@ void softlockup_tick(void) * Wake up the high-prio watchdog task twice per * threshold timespan. */ - if (now > touch_timestamp + softlockup_thresh/2) + if (time_after(now - softlockup_thresh/2, touch_timestamp)) wake_up_process(per_cpu(watchdog_task, this_cpu)); /* Warn about unreasonable delays: */ - if (now <= (touch_timestamp + softlockup_thresh)) + if (time_before_eq(now - softlockup_thresh, touch_timestamp)) return; per_cpu(print_timestamp, this_cpu) = touch_timestamp;