Skip to content

Commit

Permalink
core/cpu.c: assert pir is sane before using
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
stewartsmith committed Jul 20, 2018
1 parent c1d43fc commit 25f7266
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,7 @@ void init_all_cpus(void)
" State=%d\n", pir, server_no, state);

/* Setup thread 0 */
assert(pir <= cpu_max_pir);
t = pt = &cpu_stacks[pir].cpu;
if (t != boot_cpu) {
init_cpu_thread(t, state, pir);
Expand Down

0 comments on commit 25f7266

Please sign in to comment.