Re: [Qemu-devel] [PATCH 1/2] spapr_cpu_core: instantiate CPUs separately

2017-10-13 Thread Greg Kurz
On Fri, 13 Oct 2017 11:21:20 +0200 Igor Mammedov wrote: > On Fri, 13 Oct 2017 10:35:19 +0200 > Greg Kurz wrote: > > > The current code assumes that only the CPU core object holds a > > reference on each individual CPU object, and happily frees their > > allocated memory when the core is unreali

Re: [Qemu-devel] [PATCH 1/2] spapr_cpu_core: instantiate CPUs separately

2017-10-13 Thread Igor Mammedov
On Fri, 13 Oct 2017 10:35:19 +0200 Greg Kurz wrote: > The current code assumes that only the CPU core object holds a > reference on each individual CPU object, and happily frees their > allocated memory when the core is unrealized. This is dangerous > as some other code can legitimely keep a poin