cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
26ba25
From 432dce181a267465b10d3e4bca025314d85ff76f Mon Sep 17 00:00:00 2001
26ba25
From: Serhii Popovych <spopovyc@redhat.com>
26ba25
Date: Mon, 9 Jul 2018 11:31:18 +0200
26ba25
Subject: [PATCH 202/268] Revert "usb: release the created buses"
26ba25
MIME-Version: 1.0
26ba25
Content-Type: text/plain; charset=UTF-8
26ba25
Content-Transfer-Encoding: 8bit
26ba25
26ba25
RH-Author: Serhii Popovych <spopovyc@redhat.com>
26ba25
Message-id: <1531135878-18813-4-git-send-email-spopovyc@redhat.com>
26ba25
Patchwork-id: 81266
26ba25
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH v2 3/3] Revert "usb: release the created buses"
26ba25
Bugzilla: 1556678
26ba25
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
26ba25
RH-Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
26ba25
RH-Acked-by: David Gibson <dgibson@redhat.com>
26ba25
26ba25
From: Marc-André Lureau <marcandre.lureau@redhat.com>
26ba25
26ba25
The USB device don't hold the bus. There is no ASAN related reports
26ba25
anymore.
26ba25
26ba25
This reverts commit cd7bc87868d534f95e928cad98e2a52df7695771.
26ba25
26ba25
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
26ba25
Message-id: 20180613172815.32738-3-marcandre.lureau@redhat.com
26ba25
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
26ba25
(cherry picked from commit 9b5c2fd53feb574036747d0284fd7f73dfedc89c)
26ba25
Signed-off-by: Serhii Popovych <spopovyc@redhat.com>
26ba25
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
26ba25
---
26ba25
 hw/usb/dev-storage.c | 16 ----------------
26ba25
 hw/usb/dev-uas.c     |  2 --
26ba25
 2 files changed, 18 deletions(-)
26ba25
26ba25
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
26ba25
index 68e2062..9fb00a9 100644
26ba25
--- a/hw/usb/dev-storage.c
26ba25
+++ b/hw/usb/dev-storage.c
26ba25
@@ -589,13 +589,6 @@ static const struct SCSIBusInfo usb_msd_scsi_info_bot = {
26ba25
     .load_request = usb_msd_load_request,
26ba25
 };
26ba25
 
26ba25
-static void usb_msd_unrealize_storage(USBDevice *dev, Error **errp)
26ba25
-{
26ba25
-    MSDState *s = USB_STORAGE_DEV(dev);
26ba25
-
26ba25
-    object_unref(OBJECT(&s->bus));
26ba25
-}
26ba25
-
26ba25
 static void usb_msd_storage_realize(USBDevice *dev, Error **errp)
26ba25
 {
26ba25
     MSDState *s = USB_STORAGE_DEV(dev);
26ba25
@@ -645,13 +638,6 @@ static void usb_msd_storage_realize(USBDevice *dev, Error **errp)
26ba25
     s->scsi_dev = scsi_dev;
26ba25
 }
26ba25
 
26ba25
-static void usb_msd_bot_unrealize(USBDevice *dev, Error **errp)
26ba25
-{
26ba25
-    MSDState *s = USB_STORAGE_DEV(dev);
26ba25
-
26ba25
-    object_unref(OBJECT(&s->bus));
26ba25
-}
26ba25
-
26ba25
 static void usb_msd_bot_realize(USBDevice *dev, Error **errp)
26ba25
 {
26ba25
     MSDState *s = USB_STORAGE_DEV(dev);
26ba25
@@ -716,7 +702,6 @@ static void usb_msd_class_storage_initfn(ObjectClass *klass, void *data)
26ba25
     USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
26ba25
 
26ba25
     uc->realize = usb_msd_storage_realize;
26ba25
-    uc->unrealize = usb_msd_unrealize_storage;
26ba25
     dc->props = msd_properties;
26ba25
 }
26ba25
 
26ba25
@@ -779,7 +764,6 @@ static void usb_msd_class_bot_initfn(ObjectClass *klass, void *data)
26ba25
     USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
26ba25
 
26ba25
     uc->realize = usb_msd_bot_realize;
26ba25
-    uc->unrealize = usb_msd_bot_unrealize;
26ba25
     uc->attached_settable = true;
26ba25
 }
26ba25
 
26ba25
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
26ba25
index c218b53..eaf515d 100644
26ba25
--- a/hw/usb/dev-uas.c
26ba25
+++ b/hw/usb/dev-uas.c
26ba25
@@ -896,8 +896,6 @@ static void usb_uas_unrealize(USBDevice *dev, Error **errp)
26ba25
     UASDevice *uas = USB_UAS(dev);
26ba25
 
26ba25
     qemu_bh_delete(uas->status_bh);
26ba25
-
26ba25
-    object_unref(OBJECT(&uas->bus));
26ba25
 }
26ba25
 
26ba25
 static void usb_uas_realize(USBDevice *dev, Error **errp)
26ba25
-- 
26ba25
1.8.3.1
26ba25