summaryrefslogtreecommitdiffstats
path: root/include/exec
diff options
context:
space:
mode:
authorAndreas Färber2015-03-17 17:46:36 +0100
committerEduardo Habkost2015-06-02 20:15:52 +0200
commit0e3bd56294230ad0ee20fce587879c29a83a0d8b (patch)
treea346b021af23426c54d10d3564a1e5de3fc32fb2 /include/exec
parentMerge remote-tracking branch 'remotes/sstabellini/tags/xen-15-06-02-tag' into... (diff)
downloadqemu-0e3bd56294230ad0ee20fce587879c29a83a0d8b.tar.gz
qemu-0e3bd56294230ad0ee20fce587879c29a83a0d8b.tar.xz
qemu-0e3bd56294230ad0ee20fce587879c29a83a0d8b.zip
pc: Ensure non-zero CPU ref count after attaching to ICC bus
Setting the parent bus of a device increases its ref count, which we ultimately want to level out. However it is only safe to do so after the last reference to the device in local code, as qom-set or similar operations might decrease the ref count. Therefore move the object_unref() from pc_new_cpu() into its callers. The APIC operations on the last CPU in pc_cpus_init() are still potentially insecure, but that is beyond the scope of this code movement. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/exec')
0 files changed, 0 insertions, 0 deletions