]> git.proxmox.com Git - mirror_qemu.git/commit
qdev: Use GList for global properties
authorEduardo Habkost <ehabkost@redhat.com>
Thu, 28 Jan 2016 14:22:35 +0000 (12:22 -0200)
committerEduardo Habkost <ehabkost@redhat.com>
Fri, 17 Jun 2016 13:42:21 +0000 (10:42 -0300)
commitf9a8b5530d438f836f9697639814f585aaec554d
tree22d2d7b648d2fc15f4848e486b8a340f170edaa2
parent4acc8fdfd315f7ee474bea28fcbcc4dca9717d13
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>
hw/core/qdev-properties.c
include/hw/qdev-core.h