[PATCH] Re: Strange behaviour of adjtimex/settimeofday syscalls
Manuel Tobias Schiller
mala at hinterbergen.de
Sat Sep 3 20:21:29 EST 2005
I'm running Linux 2.4.31 on a G3. I usually synchronize the clocks on my
LAN using ntpd. Inspecting the kernel with the ntptime utility yields an
error exit code from ntp_adjtime() which won't clear for weeks (i.e. the
output line looks like this:
ntp_adjtime() returns code 5 (ERROR)
The members of the structure representing the kernel time PLL status etc
all look reasonable, and clock synchronisation using ntpd works quite
well - that's why I think there may be something wrong with the kernel
setting this error condition.)
Looking through the kernel source, I found that the ppc version of
do_settimeofday sets an error variable without clearing it anywhere.
Since other architectures don't do that, I applied the patch below to
avoid setting the error state.
I've been running with the modified kernel for almost a month now
without problems, so I think this patch might be interesting for the
general public (I haven't found anything similar with google). I'd like
to know what you think of it. If you think it's ok, it would be nice of
you if someone could make sure the patch makes it into mainstream
kernels. (The likelihood of the patch making it into the mainstream
kernels is just higher if more people have looked over it, so that's why
I'm posting it here, hoping for people that have more knowledge of these
things than I and are willing to test it).
Many thanks for your consideration.
P.S. I've just noticed that the web interface doesn't handle the PGP
signatures of my previous submission well, so I'm resending the mail
without it. I'm terribly sorry for the inconvenience.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1036 bytes
Desc: not available
More information about the Linuxppc-dev