cpuidle: Fix crash with single idle state
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest4 patches 6 repliesIn review
Changes in v2 from the cover letter
- Move fix to cpuidle_select() core bail-out instead of ladder governor
- Remove redundant single-state handling from menu, teo, haltpoll
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | cpuidle: Skip governor when only one idle state is availabledrivers/ | +10 | 5 replies | |
| 2/4 | cpuidle: haltpoll: Remove single state handlingdrivers/ | +1 | 1 reply | |
| 3/4 | cpuidle: teo: Remove single state handlingdrivers/ | +0 | 0 replies | |
| 4/4 | cpuidle: menu: Remove single state handlingdrivers/ | +1 | 0 replies |
Reviews trailers per patch
2 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Christian Loehle |
|---|---|
| 1/4 | R-b |
| 2/4 | R-b |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/4] cpuidle: Fix crash with single idle state
When a cpuidle driver registers only a single idle state, the ladder governor can compute an out-of-bounds index, leading to a NULL pointer dereference in cpuidle_enter_state().
Patch 1 fixes this by adding a bail-out in cpuidle_select() that bypasses the governor entirely when state_count <= 1.
Patches 2-4 remove the now-redundant single-state handling from the haltpoll, teo, and menu governors.
v1:
https://lore.kernel.org/all/[email protected]/
v1 -> v2:
- Move fix to cpuidle_select() core bail-out instead of ladder governor
- Remove redundant single-state handling from menu, teo, haltpoll
Aboorva Devarajan (2):
cpuidle: Skip governor when only one idle state is available
cpuidle: haltpoll: Remove single state handling
Christian Loehle (2):
cpuidle: teo: Remove single state handling
cpuidle: menu: Remove single state handling
drivers/cpuidle/cpuidle.c | 10 ++++++++++ drivers/cpuidle/governors/haltpoll.c | 2 +- drivers/cpuidle/governors/menu.c | 2 +- drivers/cpuidle/governors/teo.c | 6 ------ 4 files changed, 12 insertions(+), 8 deletions(-)
Signature · 1 line
2.52.0