All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix potential jiffies overflow
@ 2006-03-02 15:03 Atsushi Nemoto
  2006-03-02 16:43 ` Ram Gupta
  0 siblings, 1 reply; 8+ messages in thread
From: Atsushi Nemoto @ 2006-03-02 15:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm

I found i386 timer_resume is updating jiffies, not jiffies_64.  It
looks there is a potential overflow problem.  Is this a correct fix?

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
index a14d594..e4ed172 100644
--- a/arch/i386/kernel/time.c
+++ b/arch/i386/kernel/time.c
@@ -413,7 +413,7 @@ static int timer_resume(struct sys_devic
 	xtime.tv_sec = sec;
 	xtime.tv_nsec = 0;
 	write_sequnlock_irqrestore(&xtime_lock, flags);
-	jiffies += sleep_length;
+	jiffies_64 += sleep_length;
 	wall_jiffies += sleep_length;
 	if (last_timer->resume)
 		last_timer->resume();

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-03-05  1:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-02 15:03 [PATCH] fix potential jiffies overflow Atsushi Nemoto
2006-03-02 16:43 ` Ram Gupta
2006-03-03  2:32   ` Atsushi Nemoto
2006-03-03  2:45     ` Andrew Morton
2006-03-03  3:31       ` Atsushi Nemoto
2006-03-03  3:48         ` Andrew Morton
2006-03-03  4:39           ` Atsushi Nemoto
2006-03-05  1:10         ` Matt Mackall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.