diff options
| author | Haofeng Li <[email protected]> | 2025-10-15 06:17:53 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2025-10-20 17:56:12 +0000 |
| commit | 39a9ed0fb6dac58547afdf9b6cb032d326a3698f (patch) | |
| tree | ba3f55826ee33b37b182aa5853b8b6379e018ed5 /scripts/basic/docproc.c | |
| parent | Linux 6.18-rc2 (diff) | |
| download | kernel-39a9ed0fb6dac58547afdf9b6cb032d326a3698f.tar.gz kernel-39a9ed0fb6dac58547afdf9b6cb032d326a3698f.zip | |
timekeeping: Fix aux clocks sysfs initialization loop bound
The loop in tk_aux_sysfs_init() uses `i <= MAX_AUX_CLOCKS` as the
termination condition, which results in 9 iterations (i=0 to 8) when
MAX_AUX_CLOCKS is defined as 8. However, the kernel is designed to support
only up to 8 auxiliary clocks.
This off-by-one error causes the creation of a 9th sysfs entry that exceeds
the intended auxiliary clock range.
Fix the loop bound to use `i < MAX_AUX_CLOCKS` to ensure exactly 8
auxiliary clock entries are created, matching the design specification.
Fixes: 7b95663a3d96 ("timekeeping: Provide interface to control auxiliary clocks")
Signed-off-by: Haofeng Li <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'scripts/basic/docproc.c')
0 files changed, 0 insertions, 0 deletions
