RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1489670 - Hot-unplugging a vhost network device leaks references to VFIOPCIDevice's
Summary: Hot-unplugging a vhost network device leaks references to VFIOPCIDevice's
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Alex Williamson
QA Contact: Yanan Fu
URL:
Whiteboard:
Depends On:
Blocks: 1490742
TreeView+ depends on / blocked
 
Reported: 2017-09-08 05:42 UTC by Sergio Lopez
Modified: 2018-04-11 00:33 UTC (History)
16 users (show)

Fixed In Version: qemu-kvm-rhev-2.10.0-2.el7
Doc Type: Bug Fix
Doc Text:
Hot-unplugging Virtual Function I/O (VFIO) devices previously failed when performed after hot-unplugging a vhost network device. This update fixes the underlying code, and the VFIO device is unplugged correctly in the described circumstances.
Clone Of:
: 1490742 (view as bug list)
Environment:
Last Closed: 2018-04-11 00:33:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1371930 0 high CLOSED i40e: "x-req" can not work normally when unbind PF form host or unload PF's driver 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2018:1104 0 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2018-04-10 22:54:38 UTC

Description Sergio Lopez 2017-09-08 05:42:55 UTC
Hot-unplugging a vhost network device leaks references to VFIOPCIDevice's. This causes that, when trying to hot-unplug one of those VFIO devices, QEMU can't finalize it properly because the references never reach 0.

So far, we've identified the following scenarios (100% reproducible):

---
 1. Start a VM with both a VIRTIO network device and a VFIO hostdev.
 2. Hot-unplug the VIRTIO device.
 3. Hot-unplug the VFIO -> QEMU can't finalize the device: ref=2
---
 1. Start a VM with just a VFIO hostdev.
 2. Hot-plug the VIRTIO device.
 3. Hot-unplug the VFIO -> QEMU can't finalize the device: ref=2
---
 1. Start a VM with just a VFIO hostdev.
 2. Hot-plug the VIRTIO device.
 3. Hot-unplug the VIRTIO device.
 4. Hot-unplug the VFIO -> QEMU can't finalize the device: ref=2
---

There's a patch for this posted in QEMU's mailing list:

 - http://lists.nongnu.org/archive/html/qemu-devel/2017-09/msg01787.html

Comment 16 Miroslav Rezanina 2017-10-13 10:26:23 UTC
Fix included in qemu-kvm-rhev-2.10.0-2.el7

Comment 20 errata-xmlrpc 2018-04-11 00:33:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:1104


Note You need to log in before you can comment on or make changes to this bug.