diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-11-23 16:56:18 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-11-26 09:38:54 -0600 |
commit | b5007bcc9729acd995518c52eb1038c4d8416b5d (patch) | |
tree | d6aa11685de65cf05b087d403aea757b3ade9ff3 /qom/object.c | |
parent | b7f43fe46029d8fd0594cd599fa2599dcce0f553 (diff) | |
download | qemu-b5007bcc9729acd995518c52eb1038c4d8416b5d.zip qemu-b5007bcc9729acd995518c52eb1038c4d8416b5d.tar.gz qemu-b5007bcc9729acd995518c52eb1038c4d8416b5d.tar.bz2 |
hmp: do not crash on invalid SCSI hotplug
Commit 0d93692 (qdev: Convert busses to QEMU Object Model, 2012-05-02)
removed a check on the type of the bus where a SCSI disk is hotplugged.
However, hot-plugging to the wrong kind of device now causes a crash
due to either a NULL pointer dereference (avoided by the previous patch)
or a failed QOM cast.
Instead, in this case we need to use object_dynamic_cast and check for
the result, similar to what was done before that commit.
Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qom/object.c')
0 files changed, 0 insertions, 0 deletions