diff options
| author | Markus Blöchl <[email protected]> | 2025-07-20 13:54:51 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2025-07-22 12:25:21 +0000 |
| commit | 67c632b4a7fbd6b76a08b86f4950f0f84de93439 (patch) | |
| tree | 480c3a97fbdcdf0299479aa1332485d581f44b1a /drivers/gpio/gpio-mpfs.c | |
| parent | Linux 6.16-rc7 (diff) | |
| download | kernel-67c632b4a7fbd6b76a08b86f4950f0f84de93439.tar.gz kernel-67c632b4a7fbd6b76a08b86f4950f0f84de93439.zip | |
timekeeping: Zero initialize system_counterval when querying time from phc drivers
Most drivers only populate the fields cycles and cs_id of system_counterval
in their get_time_fn() callback for get_device_system_crosststamp(), unless
they explicitly provide nanosecond values.
When the use_nsecs field was added to struct system_counterval, 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 field,
which usually results in -EINVAL during the following range check.
Pass in a fully zero initialized system_counterval_t to cure that.
Fixes: 6b2e29977518 ("timekeeping: Provide infrastructure for converting to/from a base clock")
Signed-off-by: Markus Blöchl <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: John Stultz <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/all/[email protected]
Diffstat (limited to 'drivers/gpio/gpio-mpfs.c')
0 files changed, 0 insertions, 0 deletions
