Description of problem:
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run qemu-system-x86_64 -nodefaults -S -vnc :0 -monitor stdio
2. Give monitor command drive_add 0 if=scsi
Fail command with a suitable error message
F-17 fails the command with "Device is not a SCSI adapter".
Broken upstram in commit 0d936928 "qdev: Convert busses to QEMU Object Model".
Fixed in 1.2.2 stable by
Author: Paolo Bonzini <email@example.com>
Date: Fri Nov 23 16:56:18 2012 +0100
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 <firstname.lastname@example.org>
Signed-off-by: Paolo Bonzini <email@example.com>
Signed-off-by: Anthony Liguori <firstname.lastname@example.org>
(cherry picked from commit b5007bcc9729acd995518c52eb1038c4d8416b5d)
Signed-off-by: Michael Roth <email@example.com>
qemu-1.2.2-1.fc18 has been submitted as an update for Fedora 18.
qemu-1.2.2-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.