Re: [FIX PATCH v1] powerpc/pseries: Fix reference count leak during CPU unplug

2022-03-11 Thread Christophe Leroy
Le 09/03/2017 à 05:37, Bharata B Rao a écrit : The following warning is seen when a CPU is hot unplugged on a PowerKVM guest: refcount_t: underflow; use-after-free. [ cut here ] WARNING: CPU: 0 PID: 53 at lib/refcount.c:128 refcount_sub_and_test+0xd8/0xf0 Modules linke

Re: [FIX PATCH v1] powerpc/pseries: Fix reference count leak during CPU unplug

2017-03-22 Thread Michael Bringmann
I get the error when removing a CPU that has been hotplugged after boot. On 03/14/2017 03:42 PM, Tyrel Datwyler wrote: > On 03/13/2017 03:29 AM, Bharata B Rao wrote: >> On Thu, Mar 09, 2017 at 01:34:00PM -0800, Tyrel Datwyler wrote: >>> On 03/08/2017 08:37 PM, Bharata B Rao wrote: The followi

Re: [FIX PATCH v1] powerpc/pseries: Fix reference count leak during CPU unplug

2017-03-15 Thread Sachin Sant
>> So you suggest that adding of_node_get() to __of_attach_node_sysfs() >> is the right fix ? > > If I understand that this only creates for hot-added cpus then no. Also > for this to be the correct fix I would expect to see this recreate for > all hot-remove operations such as memory and pci dev

Re: [FIX PATCH v1] powerpc/pseries: Fix reference count leak during CPU unplug

2017-03-14 Thread Tyrel Datwyler
On 03/13/2017 03:29 AM, Bharata B Rao wrote: > On Thu, Mar 09, 2017 at 01:34:00PM -0800, Tyrel Datwyler wrote: >> On 03/08/2017 08:37 PM, Bharata B Rao wrote: >>> The following warning is seen when a CPU is hot unplugged on a PowerKVM >>> guest: >> >> Is this the case with cpus present at boot? Wha

Re: [FIX PATCH v1] powerpc/pseries: Fix reference count leak during CPU unplug

2017-03-13 Thread Bharata B Rao
On Thu, Mar 09, 2017 at 01:34:00PM -0800, Tyrel Datwyler wrote: > On 03/08/2017 08:37 PM, Bharata B Rao wrote: > > The following warning is seen when a CPU is hot unplugged on a PowerKVM > > guest: > > Is this the case with cpus present at boot? What about cpus hotplugged > after boot? I have obs

Re: [FIX PATCH v1] powerpc/pseries: Fix reference count leak during CPU unplug

2017-03-09 Thread Tyrel Datwyler
On 03/08/2017 08:37 PM, Bharata B Rao wrote: > The following warning is seen when a CPU is hot unplugged on a PowerKVM > guest: Is this the case with cpus present at boot? What about cpus hotplugged after boot? My suspicion is that the refcount was wrong to begin with. See my comments below. The

Re: [FIX PATCH v1] powerpc/pseries: Fix reference count leak during CPU unplug

2017-03-09 Thread Michael Ellerman
Bharata B Rao writes: > The following warning is seen when a CPU is hot unplugged on a PowerKVM > guest: > > refcount_t: underflow; use-after-free. ... > > Fix this by ensuring that of_node_put() is called only from the > error path in dlpar_cpu_remove_by_index(). In the normal path, > of_node_pu

Re: [FIX PATCH v1] powerpc/pseries: Fix reference count leak during CPU unplug

2017-03-08 Thread Sachin Sant
> Fix this by ensuring that of_node_put() is called only from the > error path in dlpar_cpu_remove_by_index(). In the normal path, > of_node_put() happens as part of dlpar_detach_node(). > > Signed-off-by: Bharata B Rao > Cc: Nathan Fontenot > --- > Changes in v1: > - Fixed the refcount problem

[FIX PATCH v1] powerpc/pseries: Fix reference count leak during CPU unplug

2017-03-08 Thread Bharata B Rao
The following warning is seen when a CPU is hot unplugged on a PowerKVM guest: refcount_t: underflow; use-after-free. [ cut here ] WARNING: CPU: 0 PID: 53 at lib/refcount.c:128 refcount_sub_and_test+0xd8/0xf0 Modules linked in: CPU: 0 PID: 53 Comm: kworker/u510:1 Not tainte