]> Git Repo - qemu.git/commit - exec.c
exec: Don't use cpu_index to detect if cpu_exec_init()'s been called
authorIgor Mammedov <[email protected]>
Mon, 25 Jul 2016 09:59:20 +0000 (11:59 +0200)
committerEduardo Habkost <[email protected]>
Tue, 26 Jul 2016 18:32:00 +0000 (15:32 -0300)
commit8b1b835035fda831b405c1947210efcf758a7ca8
tree5be390aa590a4643cd51a681b4ebb860cd98164c
parent1bc7e522d9cf1b58f2de9c8f1737be0bb5129c35
exec: Don't use cpu_index to detect if cpu_exec_init()'s been called

Instead use QTAIL's tqe_prev field to detect if cpu's been
placed in list by cpu_exec_init() which is always set if
QTAIL element is in list.

Fixes SIGSEGV on failure path in case cpu_index is assigned
by board and cpu.relalize() fails before cpu_exec_init() is called.

In follow up patches, cpu_index will be assigned by boards that
support cpu hot(un)plug and need stable cpu_index that doesn't
depend on order cpus are created/removed.

Signed-off-by: Igor Mammedov <[email protected]>
Reported-by: David Gibson <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
exec.c
This page took 0.020524 seconds and 4 git commands to generate.