Home
last modified time | relevance | path

Searched hist:ecda255e (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/hw/ppc/
H A Dspapr.cecda255e Thu Aug 30 00:54:40 CDT 2018 Sam Bobroff <sbobroff@linux.ibm.com> spapr: Correct reference count on spapr-cpu-core

spapr_init_cpus() currently creates spapr-cpu-core objects via
object_new() and setting their realized property to true. This leaves
their reference count at two, because object_new() adds an initial
reference and the realization attaches them to a default parent object
which also increments the reference count.

This causes a problem if one of these cores is hot unplugged: no
delete event is generated for it because it's reference count doesn't
reach zero when it is detached from it's parent.

Correct this by adding a call to object_unref() in spapr_init_cpus().

Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>