Re: [Qemu-devel] [PATCH for-2.12 REPOST] spapr_cpu_core: instantiate CPUs separately

2017-11-20 Thread David Gibson
On Mon, Nov 20, 2017 at 03:56:48PM +0100, Igor Mammedov wrote: > On Mon, 20 Nov 2017 10:19:54 +0100 > 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 un

Re: [Qemu-devel] [PATCH for-2.12 REPOST] spapr_cpu_core: instantiate CPUs separately

2017-11-20 Thread Igor Mammedov
On Mon, 20 Nov 2017 10:19:54 +0100 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

[Qemu-devel] [PATCH for-2.12 REPOST] spapr_cpu_core: instantiate CPUs separately

2017-11-20 Thread Greg Kurz
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 pointer to a CPU if it calls object_ref(), but it would end up wit