diff options
| author | Jingkai Tan <contact@jingk.ai> | 2026-03-05 21:38:31 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-03-09 19:52:00 +0100 |
| commit | 638a95168fd53a911201681cd5e55c7965b20733 (patch) | |
| tree | c61bb43f6851eb5c404f857213083586c863a6ae /Documentation/driver-model/git@git.tavy.me:linux.git | |
| parent | 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681 (diff) | |
ACPI: processor: idle: Add missing bounds check in flatten_lpi_states()
The inner loop in flatten_lpi_states() that combines composite LPI
states can increment flat_state_cnt multiple times within the loop.
The condition that guards this (checks bounds against ACPI_PROCESSOR
_MAX_POWER) occurs at the top of the outer loop. flat_state_cnt might
exceed ACPI_PROCESSOR_MAX_POWER if it is incremented multiple times
within the inner loop between outer loop iterations.
Add a bounds check after the increment inside the inner loop so that
it breaks out when flat_state_cnt reaches ACPI_PROCESSOR_MAX_POWER.
The existing check in the outer loop will then handle the warning.
Signed-off-by: Jingkai Tan <contact@jingk.ai>
Reviewed-by: Sudeep Holla <sudeep.holla@kernel.org>
Link: https://patch.msgid.link/20260305213831.53985-1-contact@jingk.ai
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Documentation/driver-model/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
