[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 33/40] qmp: Fix device-list-properties not to crash
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 33/40] qmp: Fix device-list-properties not to crash for abstract device |
Date: |
Wed, 21 Oct 2015 12:52:03 -0500 |
From: Markus Armbruster <address@hidden>
Broken in commit f4eb32b "qmp: show QOM properties in
device-list-properties", v2.1.
Cc: address@hidden
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Message-Id: <address@hidden>
(cherry picked from commit edb1523d90415cb79f60f83b4028ef3820d15612)
Conflicts:
tests/device-introspect-test.c
* removed hunk specific to QAPI introspection (not in 2.4)
Signed-off-by: Michael Roth <address@hidden>
---
qmp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/qmp.c b/qmp.c
index 403805a..8603c46 100644
--- a/qmp.c
+++ b/qmp.c
@@ -514,6 +514,12 @@ DevicePropertyInfoList *qmp_device_list_properties(const
char *typename,
return NULL;
}
+ if (object_class_is_abstract(klass)) {
+ error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "name",
+ "non-abstract device type");
+ return NULL;
+ }
+
obj = object_new(typename);
QTAILQ_FOREACH(prop, &obj->properties, node) {
--
1.9.1
- [Qemu-devel] [PATCH 25/40] qom: Do not reuse errp after a possible error, (continued)
- [Qemu-devel] [PATCH 25/40] qom: Do not reuse errp after a possible error, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 26/40] qom: Fix invalid error check in property_get_str(), Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 27/40] tcg/mips: Fix clobbering of qemu_ld inputs, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 28/40] target-ppc: fix vcipher, vcipherlast, vncipherlast and vpermxor, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 29/40] target-ppc: fix xscmpodp and xscmpudp decoding, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 02/40] mirror: Fix coroutine reentrance, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 31/40] virtio-net: unbreak self announcement and guest offloads after migration, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 32/40] vmxnet3: Drop net_vmxnet3_info.can_receive, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 30/40] virtio: avoid leading underscores for helpers, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 35/40] Revert "qdev: Use qdev_get_device_class() for -device <type>, help", Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 33/40] qmp: Fix device-list-properties not to crash for abstract device,
Michael Roth <=
- [Qemu-devel] [PATCH 34/40] qdev: Protect device-list-properties against broken devices, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 37/40] s390x/kvm: Fix vector validity bit in device machine checks, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 36/40] misc: zynq_slcr: Fix MMIO writes, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 38/40] util/qemu-config: fix missing machine command line options, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 40/40] virtio-input: ignore events until the guest driver is ready, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 39/40] Migration: Generate the completed event only when we complete, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 04/40] block/iscsi: validate block size returned from target, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 03/40] target-arm/arm-semi.c: Fix broken SYS_WRITE0 via gdb, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 05/40] exec-all: Translate TCI return addresses backwards too, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 06/40] block/nfs: fix calculation of allocated file size, Michael Roth, 2015/10/21