summary refs log tree commit diff stats
path: root/hw/intc/omap_intc.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-11-20 18:19:23 +0100
committerMichael S. Tsirkin <mst@redhat.com>2017-12-01 19:05:58 +0200
commit75ba2ddb188fa07c3442446766782036e3085cba (patch)
tree2179d5e3455ca2f2ab3eabc246173dfdb15d5d89 /hw/intc/omap_intc.c
parent758ead31c7e17bf17a9ef2e0ca1c3e86ab296b43 (diff)
downloadfocaccia-qemu-75ba2ddb188fa07c3442446766782036e3085cba.tar.gz
focaccia-qemu-75ba2ddb188fa07c3442446766782036e3085cba.zip
pc: fix crash on attempted cpu unplug
when qemu is started with '-no-acpi' CLI option, an attempt
to unplug a CPU using device_del results in null pointer
dereference at:

  #0 object_get_class
  #1 pc_machine_device_unplug_request_cb
  #2 qmp_marshal_device_del

which is caused by pcms->acpi_dev == NULL due to ACPI support
being disabled.

Considering that ACPI support is necessary for unplug to work,
check that it's enabled and fail unplug request gracefully
if no acpi device were found.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/intc/omap_intc.c')
0 files changed, 0 insertions, 0 deletions