Commit 8c2eb4805d422bdbf60ba00ff233c794d23c3c00
Committed by
Ingo Molnar
1 parent
0cff810f54
Exists in
master
and in
7 other branches
softlockup: Stop spurious softlockup messages due to overflow
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 <colin.king@canonical.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: <stable@kernel.org> LKML-Reference: <1268994482.1798.6.camel@lenovo> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
kernel/softlockup.c
... | ... | @@ -155,11 +155,11 @@ |
155 | 155 | * Wake up the high-prio watchdog task twice per |
156 | 156 | * threshold timespan. |
157 | 157 | */ |
158 | - if (now > touch_ts + softlockup_thresh/2) | |
158 | + if (time_after(now - softlockup_thresh/2, touch_ts)) | |
159 | 159 | wake_up_process(per_cpu(softlockup_watchdog, this_cpu)); |
160 | 160 | |
161 | 161 | /* Warn about unreasonable delays: */ |
162 | - if (now <= (touch_ts + softlockup_thresh)) | |
162 | + if (time_before_eq(now - softlockup_thresh, touch_ts)) | |
163 | 163 | return; |
164 | 164 | |
165 | 165 | per_cpu(softlockup_print_ts, this_cpu) = touch_ts; |