cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-Revert-qdev-monitor-Fix-crash-when-device_add-is-cal.patch

0a122b
From 0a754547775c6fa99d339a18e07fc9bca013b3ca Mon Sep 17 00:00:00 2001
0a122b
From: Markus Armbruster <armbru@redhat.com>
0a122b
Date: Fri, 17 Jan 2014 17:07:51 +0100
0a122b
Subject: [PATCH 01/11] Revert "qdev-monitor: Fix crash when device_add is called with abstract driver"
0a122b
0a122b
RH-Author: Markus Armbruster <armbru@redhat.com>
0a122b
Message-id: <1389978479-30595-2-git-send-email-armbru@redhat.com>
0a122b
Patchwork-id: 56789
0a122b
O-Subject: [PATCH 7.0 qemu-kvm 1/9] Revert "qdev-monitor: Fix crash when device_add is called with abstract driver"
0a122b
Bugzilla: 669524
0a122b
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
0a122b
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
0a122b
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
0a122b
0a122b
This reverts commit 3e97a22728afed3c77140486ec3863eba941535b.
0a122b
0a122b
Reverting because it makes -device nonexistant crash.  Incorrect
0a122b
conflict resolution.  I'm going to reapply the upstream commit in a
0a122b
place where it applies cleanly, and actually works.
0a122b
0a122b
Signed-off-by: Markus Armbruster <armbru@redhat.com>
0a122b
---
0a122b
 qdev-monitor.c | 6 ------
0a122b
 1 file changed, 6 deletions(-)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 qdev-monitor.c |    6 ------
0a122b
 1 files changed, 0 insertions(+), 6 deletions(-)
0a122b
0a122b
diff --git a/qdev-monitor.c b/qdev-monitor.c
0a122b
index 979502e..f78ff64 100644
0a122b
--- a/qdev-monitor.c
0a122b
+++ b/qdev-monitor.c
0a122b
@@ -477,12 +477,6 @@ DeviceState *qdev_device_add(QemuOpts *opts)
0a122b
         }
0a122b
     }
0a122b
 
0a122b
-    if (object_class_is_abstract(obj)) {
0a122b
-        qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver",
0a122b
-                      "non-abstract device type");
0a122b
-        return NULL;
0a122b
-    }
0a122b
-
0a122b
     k = DEVICE_CLASS(obj);
0a122b
 
0a122b
     if (!k || k->cannot_instantiate_with_device_add_yet) {
0a122b
-- 
0a122b
1.7.1
0a122b