Paolo Bonzini b5007bcc97 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>
2012-11-26 09:38:54 -06:00
..
2012-10-29 19:41:56 +01:00
2012-10-23 08:58:25 -05:00
2012-11-01 19:49:45 +01:00
2012-11-01 19:49:45 +01:00
2012-02-07 22:11:04 +04:00
2012-10-10 11:13:31 +10:00
2012-10-22 13:26:42 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-06-21 16:06:11 +00:00
2012-01-13 10:55:56 -06:00
2012-02-15 09:39:21 -06:00
2012-10-30 07:45:10 +00:00
2012-10-30 07:45:10 +00:00
2012-10-23 08:58:25 -05:00
2012-02-15 09:39:21 -06:00
2012-11-01 13:10:06 +01:00
2012-10-23 08:58:25 -05:00
2012-07-28 09:23:11 +00:00
2012-03-14 22:20:26 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-02-15 09:39:21 -06:00
2012-08-22 10:47:17 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-01-13 10:55:56 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-14 18:19:22 +01:00
2012-10-23 08:58:25 -05:00
2012-10-10 11:13:32 +10:00
2012-10-10 11:13:32 +10:00
2012-10-23 08:58:25 -05:00
2012-02-10 10:44:52 +00:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-01 13:10:06 +01:00
2012-08-22 10:47:17 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-02-15 09:39:21 -06:00
2012-04-26 12:54:17 +04:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-06-18 15:14:38 +02:00
2012-03-07 12:27:41 +02:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-26 09:35:35 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-02-15 09:39:21 -06:00
2012-10-23 08:58:25 -05:00
2012-09-23 07:11:28 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-01 13:10:06 +01:00
2012-10-22 13:26:42 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-10-23 08:58:25 -05:00
2012-02-15 09:39:21 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-29 16:38:26 +10:00
2012-11-10 13:49:20 +00:00
2012-02-15 09:39:21 -06:00
2012-10-10 11:13:31 +10:00
2012-02-15 09:39:21 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-12 16:42:56 +01:00
2012-03-14 22:20:26 +01:00
2012-10-22 13:26:42 -05:00
2012-03-14 22:20:26 +01:00
2012-10-22 13:26:42 -05:00
2012-10-23 08:58:25 -05:00
2012-03-14 22:20:26 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-29 17:59:06 +02:00
2012-10-29 17:59:06 +02:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-01 13:10:06 +01:00
2012-10-23 08:58:25 -05:00
2012-08-01 13:32:10 +01:00
2012-11-10 13:49:20 +00:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-07-27 21:13:01 +00:00
2012-11-01 13:10:06 +01:00
2012-11-26 09:35:35 -06:00
2012-11-26 09:35:35 -06:00
2012-10-23 08:58:25 -05:00
2012-11-26 09:35:37 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-08-09 18:21:47 +00:00
2012-11-16 11:27:05 +01:00
2010-11-22 10:00:06 +02:00
2012-01-27 10:50:50 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-02-17 09:58:22 -06:00
2012-10-30 07:45:11 +00:00
2012-02-15 09:39:21 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-30 07:45:08 +00:00
2012-10-30 07:45:09 +00:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-03-14 22:20:26 +01:00
2012-10-23 08:58:25 -05:00
2012-10-29 11:45:54 +01:00
2012-03-14 22:20:26 +01:00
2012-10-23 08:58:25 -05:00
2012-04-07 14:00:45 +00:00
2012-04-12 11:14:29 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-29 11:45:54 +01:00
2012-10-23 08:58:25 -05:00
2012-11-05 11:54:49 +01:00
2012-10-08 12:15:17 +02:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-29 19:41:56 +01:00
2012-10-05 15:10:21 +02:00
2012-10-23 08:58:25 -05:00
2012-10-30 07:45:12 +00:00
2012-10-22 13:26:42 -05:00
2012-10-23 08:58:25 -05:00
2012-02-15 09:39:21 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-03-16 00:41:15 +02:00
2012-03-16 00:41:28 +02:00
2012-03-16 00:41:28 +02:00
2012-11-01 13:10:06 +01:00
2012-01-13 10:55:56 -06:00
2012-02-15 09:39:21 -06:00
2012-11-26 09:35:36 -06:00
2012-02-15 09:39:21 -06:00
2012-10-23 08:58:25 -05:00
2012-10-05 07:58:37 -05:00
2012-10-31 01:02:46 +01:00
2012-11-01 13:10:06 +01:00
2012-11-01 13:10:06 +01:00
2012-10-10 11:13:32 +10:00
2012-10-10 11:13:32 +10:00
2012-10-10 11:13:32 +10:00
2012-11-10 13:49:20 +00:00
2012-10-31 01:02:45 +01:00
2012-11-10 13:49:20 +00:00
2012-10-31 01:02:45 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-11-01 13:10:06 +01:00
2012-11-01 13:10:06 +01:00
2012-02-15 09:39:21 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-02-04 12:45:10 +00:00
2012-10-20 07:52:54 +00:00
2012-11-16 11:27:07 +01:00
2012-11-16 11:27:06 +01:00
2012-02-04 12:45:10 +00:00
2012-10-23 08:58:25 -05:00
2012-02-15 09:39:21 -06:00
2012-03-16 00:45:23 +02:00
2012-10-23 08:58:25 -05:00
2012-02-15 09:39:21 -06:00
2012-02-15 09:39:21 -06:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00
2012-10-04 15:54:18 +02:00
2012-11-01 15:17:57 +01:00
2012-10-23 08:58:25 -05:00
2012-10-23 08:58:25 -05:00