[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qdev: fix -device scsi-hd,help regression
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH] qdev: fix -device scsi-hd,help regression |
Date: |
Wed, 9 Jan 2019 11:42:20 +0100 |
On Wed, 9 Jan 2019 14:23:11 +0400
Marc-André Lureau <address@hidden> wrote:
> Since commit ea9ce8934, device_post_init() applies globals directly
> from machines and accelerator classes.
>
> There are cases, such as -device scsi-hd,help, where the machine is
> setup but there in no accelerator.
>
> Let's skip accelerator globals in this case.
>
> Fixes SEGV:
> #0 0x0000555558ea04ff in object_get_class (obj=0x0) at
> /home/elmarco/src/qemu/build/../qom/object.c:857
> #1 0x000055555854c797 in object_apply_compat_props (obj=0x616000078980) at
> /home/elmarco/src/qemu/build/../hw/core/qdev.c:978
> #2 0x000055555854c797 in object_apply_compat_props (obj=0x616000078980) at
> /home/elmarco/src/qemu/build/../hw/core/qdev.c:973
> #3 0x000055555854c959 in device_post_init (obj=0x616000078980) at
> /home/elmarco/src/qemu/build/../hw/core/qdev.c:989
> #4 0x0000555558e9e250 in object_post_init_with_type (ti=<optimized out>,
> obj=0x616000078980) at /home/elmarco/src/qemu/build/../qom/object.c:365
> #5 0x0000555558e9e250 in object_initialize_with_type (data=0x616000078980,
> size=616, type=<optimized out>) at
> /home/elmarco/src/qemu/build/../qom/object.c:425
> #6 0x0000555558e9e571 in object_new_with_type (type=0x613000031900) at
> /home/elmarco/src/qemu/build/../qom/object.c:588
> #7 0x000055555830c048 in qmp_device_list_properties (address@hidden
> "scsi-hd", address@hidden) at /home/elmarco/src/qemu/qmp.c:519
> #8 0x00005555582c4027 in qdev_device_help (opts=<optimized out>) at
> /home/elmarco/src/qemu/qdev-monitor.c:283
> #9 0x0000555559378fa2 in qemu_opts_foreach (list=<optimized out>,
> address@hidden <device_help_func>, address@hidden, address@hidden) at
> /home/elmarco/src/qemu/util/qemu-option.c:1171
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1664364
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
> hw/core/qdev.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
Reviewed-by: Cornelia Huck <address@hidden>