Skip to content

Commit 8839099

Browse files
Jiang Liurafaeljw
authored andcommitted
intel_idle: close avn_cstates array with correct marker
Close avn_cstates array with correct marker to avoid overflow in function intel_idle_cpu_init(). [rjw: The problem was introduced when commit 22e580d was merged on top of eba682a (intel_idle: shrink states tables).] Fixes: 22e580d (intel_idle: Fixed C6 state on Avoton/Rangeley processors) Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent ba0dc81 commit 8839099

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/idle/intel_idle.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ static struct cpuidle_state atom_cstates[] = {
329329
{
330330
.enter = NULL }
331331
};
332-
static struct cpuidle_state avn_cstates[] __initdata = {
332+
static struct cpuidle_state avn_cstates[] = {
333333
{
334334
.name = "C1-AVN",
335335
.desc = "MWAIT 0x00",
@@ -344,6 +344,8 @@ static struct cpuidle_state avn_cstates[] __initdata = {
344344
.exit_latency = 15,
345345
.target_residency = 45,
346346
.enter = &intel_idle },
347+
{
348+
.enter = NULL }
347349
};
348350

349351
/**

0 commit comments

Comments
 (0)