[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y12pc86o.ffs@tglx>
Date: Wed, 16 Oct 2024 00:28:31 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Benjamin ROBIN <dev@...jarobin.fr>, jstultz@...gle.com
Cc: sboyd@...nel.org, linux-kernel@...r.kernel.org, Benjamin ROBIN
<dev@...jarobin.fr>
Subject: Re: [PATCH] ntp: Make sure RTC is synchronized for any time jump
On Sun, Oct 06 2024 at 18:58, Benjamin ROBIN wrote:
> @@ -2553,7 +2556,6 @@ int do_adjtimex(struct __kernel_timex *txc)
> {
> struct timekeeper *tk = &tk_core.timekeeper;
> struct audit_ntp_data ad;
> - bool offset_set = false;
> bool clock_set = false;
> struct timespec64 ts;
> unsigned long flags;
> @@ -2576,7 +2578,6 @@ int do_adjtimex(struct __kernel_timex *txc)
> if (ret)
> return ret;
>
> - offset_set = delta.tv_sec != 0;
> audit_tk_injoffset(delta);
> }
>
> @@ -2610,7 +2611,7 @@ int do_adjtimex(struct __kernel_timex *txc)
> if (clock_set)
> clock_was_set(CLOCK_SET_WALL);
>
> - ntp_notify_cmos_timer(offset_set);
> + ntp_notify_cmos_timer(false);
Can you please add a comment why this does not need to cancel the
hrtimer? It took me a few looks to validate that this is correct. Six
months down the road we both forgot about it. :)
Also can you please rebase this on top of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
which has a larger change of the NTP code.
Thanks,
tglx
Powered by blists - more mailing lists