yeahuh / rpms / qemu-kvm

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