[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 8af734: qom: Make object_child_foreach() safe
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] 8af734: qom: Make object_child_foreach() safe for objects ... |
Date: |
Fri, 05 Sep 2014 03:30:05 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 8af734ca318369c4eb76f355ed4cc7d4e6abc2a6
https://github.com/qemu/qemu/commit/8af734ca318369c4eb76f355ed4cc7d4e6abc2a6
Author: Alexey Kardashevskiy <address@hidden>
Date: 2014-09-04 (Thu, 04 Sep 2014)
Changed paths:
M qom/object.c
Log Message:
-----------
qom: Make object_child_foreach() safe for objects removal
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 <address@hidden>
Reviewed-by: Hu Tao <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
Commit: d2659e27e1ec0b5126faa0f4fef78755950b39e6
https://github.com/qemu/qemu/commit/d2659e27e1ec0b5126faa0f4fef78755950b39e6
Author: Andreas Färber <address@hidden>
Date: 2014-09-04 (Thu, 04 Sep 2014)
Changed paths:
M vl.c
Log Message:
-----------
machine: Clean up -machine handling
Since commit c4090f8, -object options are no longer handled through
object_set_property(), so clean up -object leftovers by renaming the
function and dropping special-casing of qom-type and id properties.
Cc: Paolo Bonzini <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
Commit: 339659041f87a76f8b71ad3d12cadfc5f89b4bb3
https://github.com/qemu/qemu/commit/339659041f87a76f8b71ad3d12cadfc5f89b4bb3
Author: Peter Crosthwaite <address@hidden>
Date: 2014-09-04 (Thu, 04 Sep 2014)
Changed paths:
M qom/object.c
Log Message:
-----------
qom: Add automatic arrayification to object_property_add()
If "[*]" is given as the last part of a QOM property name, treat that
as an array property. The added property is given the first available
name, replacing the * with a decimal number counting from 0.
First add with name "foo[*]" will be "foo[0]". Second "foo[1]" and so
on.
Callers may inspect the ObjectProperty * return value to see what
number the added property was given.
Signed-off-by: Peter Crosthwaite <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
Commit: 843ef73a690aabbea6a897e86a426ee7554d7aff
https://github.com/qemu/qemu/commit/843ef73a690aabbea6a897e86a426ee7554d7aff
Author: Peter Crosthwaite <address@hidden>
Date: 2014-09-04 (Thu, 04 Sep 2014)
Changed paths:
M memory.c
Log Message:
-----------
memory: Remove object_property_add_child_array()
Obsoleted by automatic object_property_add() arrayification.
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Peter Crosthwaite <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
Commit: d578029e71311de1b1476229d88d4aca02b783a3
https://github.com/qemu/qemu/commit/d578029e71311de1b1476229d88d4aca02b783a3
Author: Gonglei <address@hidden>
Date: 2014-09-04 (Thu, 04 Sep 2014)
Changed paths:
M hw/core/qdev.c
Log Message:
-----------
qdev: Use error_abort instead of using local_err
This error can not happen normally. If it happens, it indicates
something very wrong, we should abort QEMU. Moreover, the
user can only refer to /machine/peripheral or /objects, not
/machine/unattached.
While at it, remove superfluous check about local_err.
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Peter Crosthwaite <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
Commit: cd4520adcab70dbac8db3fe4d41836dca63715a4
https://github.com/qemu/qemu/commit/cd4520adcab70dbac8db3fe4d41836dca63715a4
Author: Gonglei <address@hidden>
Date: 2014-09-04 (Thu, 04 Sep 2014)
Changed paths:
M hw/core/qdev.c
Log Message:
-----------
qdev: Use NULL instead of local_err for qbus_child unrealize
Forcefully unrealize all children regardless of errors in earlier
iterations (if any). We should keep going with cleanup operation
rather than report an error immediately. Therefore store the first
child unrealization failure and propagate it at the end. We also
forcefully unregister vmsd and unrealize actual object, too.
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Peter Crosthwaite <address@hidden>
Cc: address@hidden
Signed-off-by: Andreas Färber <address@hidden>
Commit: 1d45a705fc007a13f20d18473290082eae6d1725
https://github.com/qemu/qemu/commit/1d45a705fc007a13f20d18473290082eae6d1725
Author: Gonglei <address@hidden>
Date: 2014-09-04 (Thu, 04 Sep 2014)
Changed paths:
M hw/core/qdev.c
Log Message:
-----------
qdev: Add cleanup logic in device_set_realized() to avoid resource leak
At present, this function doesn't have partial cleanup implemented,
which will cause resource leaks in some scenarios.
Example:
1. Assume that "dc->realize(dev, &local_err)" executes successful
and local_err == NULL;
2. device hotplug in hotplug_handler_plug() executes but fails
(it is prone to occur). Then local_err != NULL;
3. error_propagate(errp, local_err) and return. But the resources
which have been allocated in dc->realize() will be leaked.
Simple backtrace:
dc->realize()
|->device_realize
|->pci_qdev_init()
|->do_pci_register_device()
|->etc.
Add fuller cleanup logic which assures that function can
goto appropriate error label as local_err population is
detected at each relevant point.
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Peter Crosthwaite <address@hidden>
Cc: address@hidden
Signed-off-by: Andreas Färber <address@hidden>
Commit: fd884c07658d02a96a882b8457d6d7a5cd71a407
https://github.com/qemu/qemu/commit/fd884c07658d02a96a882b8457d6d7a5cd71a407
Author: Peter Maydell <address@hidden>
Date: 2014-09-04 (Thu, 04 Sep 2014)
Changed paths:
M hw/core/qdev.c
M memory.c
M qom/object.c
M vl.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter'
into staging
QOM infrastructure fixes and device conversions
* Cleanups for recursive device unrealization
# gpg: Signature made Thu 04 Sep 2014 18:17:35 BST using RSA key ID 3E7E013F
# gpg: Good signature from "Andreas Färber <address@hidden>"
# gpg: aka "Andreas Färber <address@hidden>"
* remotes/afaerber/tags/qom-devices-for-peter:
qdev: Add cleanup logic in device_set_realized() to avoid resource leak
qdev: Use NULL instead of local_err for qbus_child unrealize
qdev: Use error_abort instead of using local_err
memory: Remove object_property_add_child_array()
qom: Add automatic arrayification to object_property_add()
machine: Clean up -machine handling
qom: Make object_child_foreach() safe for objects removal
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/bbb6a1e872a6...fd884c07658d
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 8af734: qom: Make object_child_foreach() safe for objects ...,
GitHub <=