Skip to content

Commit 92d5030

Browse files
committed
Merge tag 'timers-urgent-2024-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Ingo Molnar: "Fix possible (but unlikely) out-of-bounds access in the timer migration per-CPU-init code" * tag 'timers-urgent-2024-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timers/migration: Prevent out of bounds access on failure
2 parents 9895702 + d7ad05c commit 92d5030

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/time/timer_migration.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,7 @@ static int tmigr_setup_groups(unsigned int cpu, unsigned int node)
15961596

15971597
} while (i < tmigr_hierarchy_levels);
15981598

1599-
do {
1599+
while (i > 0) {
16001600
group = stack[--i];
16011601

16021602
if (err < 0) {
@@ -1645,7 +1645,7 @@ static int tmigr_setup_groups(unsigned int cpu, unsigned int node)
16451645
tmigr_connect_child_parent(child, group);
16461646
}
16471647
}
1648-
} while (i > 0);
1648+
}
16491649

16501650
kfree(stack);
16511651

0 commit comments

Comments
 (0)