Re: [Qemu-devel] [PATCH] qom: Make object_child_foreach safe for objects removal

2014-07-14 Thread Andreas Färber
Am 14.07.2014 15:12, schrieb Alexey Kardashevskiy: > On 07/14/2014 06:14 PM, Paolo Bonzini wrote: >> Il 13/07/2014 16:41, Alexey Kardashevskiy ha scritto: >>> Current object_child_foreach() uses QTAILQ_FOREACH() to walk >>> through children and that makes children removal from the callback >>> impo

Re: [Qemu-devel] [PATCH] qom: Make object_child_foreach safe for objects removal

2014-07-14 Thread Alexey Kardashevskiy
On 07/14/2014 06:14 PM, Paolo Bonzini wrote: > Il 13/07/2014 16:41, Alexey Kardashevskiy ha scritto: >> Current object_child_foreach() uses QTAILQ_FOREACH() to walk >> through children and that makes children removal from the callback >> impossible. >> >> This makes object_child_foreach() use QTAIL

Re: [Qemu-devel] [PATCH] qom: Make object_child_foreach safe for objects removal

2014-07-14 Thread Paolo Bonzini
Il 13/07/2014 16:41, Alexey Kardashevskiy ha scritto: Current object_child_foreach() uses QTAILQ_FOREACH() to walk through children and that makes children removal from the callback impossible. This makes object_child_foreach() use QTAILQ_FOREACH_SAFE(). Signed-off-by: Alexey Kardashevskiy ---

Re: [Qemu-devel] [PATCH] qom: Make object_child_foreach safe for objects removal

2014-07-13 Thread Hu Tao
On Mon, Jul 14, 2014 at 12:41:08AM +1000, Alexey Kardashevskiy wrote: > Current object_child_foreach() uses QTAILQ_FOREACH() to walk > through children and that makes children removal from the callback > impossible. > > This makes object_child_foreach() use QTAILQ_FOREACH_SAFE(). > > Signed-off-b

[Qemu-devel] [PATCH] qom: Make object_child_foreach safe for objects removal

2014-07-13 Thread Alexey Kardashevskiy
Current object_child_foreach() uses QTAILQ_FOREACH() to walk through children and that makes children removal from the callback impossible. This makes object_child_foreach() use QTAILQ_FOREACH_SAFE(). Signed-off-by: Alexey Kardashevskiy --- The problem I am trying to solve is: there is a PHB wi