public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jim Houston <jim.houston@comcast.net>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: John Stultz <johnstul@us.ibm.com>,
	linux-kernel@vger.kernel.org, linux@horizon.com
Subject: Re: [PATCH] time_adjust cleared before use
Date: Thu, 26 Oct 2006 13:53:25 -0400	[thread overview]
Message-ID: <1161885205.7885.15.camel@x2.site> (raw)
In-Reply-To: <Pine.LNX.4.64.0610261919400.6761@scrub.home>

On Thu, 2006-10-26 at 19:22 +0200, Roman Zippel wrote:
> On Thu, 26 Oct 2006, Jim Houston wrote:
> > I notice that the code which implements adjtime clears
> > the time_adjust value before using it.  The attached 
> > patch makes the obvious fix.

> Acked-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Jim Houston <jim.houston@ccur.com>

diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 47195fa..3afeaa3 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -161,9 +161,9 @@ void second_overflow(void)
 			time_adjust += MAX_TICKADJ;
 			tick_length -= MAX_TICKADJ_SCALED;
 		} else {
-			time_adjust = 0;
 			tick_length += (s64)(time_adjust * NSEC_PER_USEC /
 					     HZ) << TICK_LENGTH_SHIFT;
+			time_adjust = 0;
 		}
 	}
 }



      reply	other threads:[~2006-10-26 17:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-26 15:29 [PATCH] time_adjust cleared before use Jim Houston
2006-10-26 17:22 ` Roman Zippel
2006-10-26 17:53   ` Jim Houston [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1161885205.7885.15.camel@x2.site \
    --to=jim.houston@comcast.net \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox