diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2006-03-06 18:42:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-06 21:40:44 -0500 |
commit | f7c09bd972b7111b8c69bf57a189571edd4d4a7d (patch) | |
tree | bc06c2cdf607746f8c9858b9771895a02f27a0b2 /arch/i386 | |
parent | b05121b29e8af45ccb424bf71dadc1d04bd23f03 (diff) |
[PATCH] x86: fix potential jiffies overflow in timer_resume()
i386 timer_resume is updating jiffies, not jiffies_64. It looks there is a
potential overflow problem. And jiffies_64 and wall_jiffies should be
protected by xtime_lock.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: john stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index a14d594bfbeb..9d3074759856 100644 --- a/arch/i386/kernel/time.c +++ b/arch/i386/kernel/time.c | |||
@@ -412,9 +412,9 @@ static int timer_resume(struct sys_device *dev) | |||
412 | write_seqlock_irqsave(&xtime_lock, flags); | 412 | write_seqlock_irqsave(&xtime_lock, flags); |
413 | xtime.tv_sec = sec; | 413 | xtime.tv_sec = sec; |
414 | xtime.tv_nsec = 0; | 414 | xtime.tv_nsec = 0; |
415 | write_sequnlock_irqrestore(&xtime_lock, flags); | 415 | jiffies_64 += sleep_length; |
416 | jiffies += sleep_length; | ||
417 | wall_jiffies += sleep_length; | 416 | wall_jiffies += sleep_length; |
417 | write_sequnlock_irqrestore(&xtime_lock, flags); | ||
418 | if (last_timer->resume) | 418 | if (last_timer->resume) |
419 | last_timer->resume(); | 419 | last_timer->resume(); |
420 | cur_timer = last_timer; | 420 | cur_timer = last_timer; |