summaryrefslogtreecommitdiffstats
path: root/include/hw/qdev-core.h
diff options
context:
space:
mode:
authorEduardo Habkost2016-01-28 15:22:35 +0100
committerEduardo Habkost2016-06-17 15:42:21 +0200
commitf9a8b5530d438f836f9697639814f585aaec554d (patch)
tree22d2d7b648d2fc15f4848e486b8a340f170edaa2 /include/hw/qdev-core.h
parentMerge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.7-20160617' into... (diff)
downloadqemu-f9a8b5530d438f836f9697639814f585aaec554d.tar.gz
qemu-f9a8b5530d438f836f9697639814f585aaec554d.tar.xz
qemu-f9a8b5530d438f836f9697639814f585aaec554d.zip
qdev: Use GList for global properties
If the same GlobalProperty struct is registered twice, the list entry gets corrupted, making tqe_next points to itself, and qdev_prop_set_globals() gets stuck in a loop. The bug can be easily reproduced by running: $ qemu-system-x86_64 -rtc-td-hack -rtc-td-hack Change global_props to use GList instead of queue.h, making the code simpler and able to deal with properties being registered twice. Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/hw/qdev-core.h')
-rw-r--r--include/hw/qdev-core.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 1ce02b20da..24aa0a7949 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -266,7 +266,6 @@ typedef struct GlobalProperty {
const char *value;
bool user_provided;
bool used;
- QTAILQ_ENTRY(GlobalProperty) next;
} GlobalProperty;
/*** Board API. This should go away once we have a machine config file. ***/