Commit 06c6796
committed
cpu/hotplug: Fix off by one in cpuhp_bringup_mask()
cpuhp_bringup_mask() iterates over a cpumask and starts all present CPUs up
to a caller provided upper limit.
The limit variable is decremented and checked for 0 before invoking
cpu_up(), which is obviously off by one and prevents the bringup of the
last CPU when the limit is equal to the number of present CPUs.
Move the decrement and check after the cpu_up() invocation.
Fixes: 18415f3 ("cpu/hotplug: Allow "parallel" bringup up to CPUHP_BP_KICK_AP_STATE")
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/87wn10ufj9.ffs@tglx1 parent 6a4be69 commit 06c6796
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1770 | 1770 | | |
1771 | 1771 | | |
1772 | 1772 | | |
1773 | | - | |
1774 | | - | |
1775 | | - | |
1776 | 1773 | | |
1777 | 1774 | | |
1778 | 1775 | | |
| |||
1781 | 1778 | | |
1782 | 1779 | | |
1783 | 1780 | | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
1784 | 1784 | | |
1785 | 1785 | | |
1786 | 1786 | | |
| |||
0 commit comments