[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANDhNCpE5KPjdJVsB_UszmA0eePnZTtQ9P-Vye2rJQRhBGFTLw@mail.gmail.com>
Date: Mon, 21 Jul 2025 17:33:43 -0700
From: John Stultz <jstultz@...gle.com>
To: Markus Blöchl <markus@...chl.de>
Cc: Thomas Gleixner <tglx@...utronix.de>, Stephen Boyd <sboyd@...nel.org>,
Lakshmi Sowjanya D <lakshmi.sowjanya.d@...el.com>,
"Christopher S. Hall" <christopher.s.hall@...el.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, markus.bloechl@...tronik.com
Subject: Re: [PATCH v2] timekeeping: Always initialize use_nsecs when querying
time from phc drivers
On Sun, Jul 20, 2025 at 6:56 AM Markus Blöchl <markus@...chl.de> wrote:
>
> Most drivers only populate the fields cycles and cs_id in their
> get_time_fn() callback for get_device_system_crosststamp() unless
> they explicitly provide nanosecond values.
> When this new use_nsecs field was added and used most drivers did not
> care.
> Clock sources other than CSID_GENERIC could then get converted in
> convert_base_to_cs() based on an uninitialized use_nsecs which usually
> results in -EINVAL during the following range check.
>
> Pass in a fully initialized system_counterval_t.
>
> Fixes: 6b2e29977518 ("timekeeping: Provide infrastructure for converting to/from a base clock")
> Cc: stable@...r.kernel.org
> Signed-off-by: Markus Blöchl <markus@...chl.de>
Sounds good. Sorry for sending you down the wrong path, and thanks to
tglx for lighting the way. :)
Acked-by: John Stultz <jstultz@...gle.com>
thanks
-john
Powered by blists - more mailing lists