summaryrefslogtreecommitdiff
path: root/qemu-aio.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-11-23 16:56:18 +0100
committerMichael Roth <mdroth@linux.vnet.ibm.com>2012-12-03 14:27:39 -0600
commita99cb0d20a4868a31f294f5d1fd4fa3225ea70ab (patch)
treed12e7b7340017fa2b2fa1001c10914fc7ad9682a /qemu-aio.h
parent5e19e498b4b2a31c985dc96b1aff078c34e40488 (diff)
downloadqemu-a99cb0d20a4868a31f294f5d1fd4fa3225ea70ab.tar.gz
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> (cherry picked from commit b5007bcc9729acd995518c52eb1038c4d8416b5d) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qemu-aio.h')
0 files changed, 0 insertions, 0 deletions