Bug 1342874
Summary: | Owner and SElinux context cannot be restored after hot-unplug USB Host device | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Pei Zhang <pzhang> |
Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | CC: | dyuan, jtomko, lmen, mzhan, rbalakri, xuzhang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-2.0.0-1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-03 18:46:27 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Pei Zhang
2016-06-06 03:36:46 UTC
Pushed as: commit 22d262c9b019ab43bc9ff7188fc31794902d5287 Author: Ján Tomko <jtomko> CommitDate: 2016-06-17 19:43:22 +0200 qemu: restore non-pci hostdev labels after detach Commit 409de00 changed the logic to only match PCI devices while moving this before Remove*HostDevice calls. https://bugzilla.redhat.com/show_bug.cgi?id=1342874 git describe: v1.3.5-316-g22d262c verify the bug version: libvirt-2.0.0-6.el7.x86_64 qemu-kvm-rhev-2.6.0-22.el7.x86_64 steps: 1.Prepared an USB device [root@localhost ~]# lsusb Bus 002 Device 002: ID 0951:1642 Kingston Technology DT101 G2 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub [root@localhost ~]# ls -alZ /dev/bus/usb/002/002 crw-rw-r--. root root system_u:object_r:usb_device_t:s0 /dev/bus/usb/002/002 2. attach this USB device to a running guest [root@localhost ~]# cat usb.xml <hostdev mode='subsystem' type='usb' managed='yes'> <source startupPolicy='optional'> <vendor id='0x0951'/> <product id='0x1642'/> </source> </hostdev> [root@localhost ~]# virsh attach-device bios usb.xml Device attached successfully [root@localhost ~]# ls -alZ /dev/bus/usb/002/002 crw-rw-r--. qemu qemu system_u:object_r:svirt_image_t:s0:c152,c690 /dev/bus/usb/002/002 3. detach device [root@localhost ~]# virsh detach-device bios usb.xml Device detached successfully [root@localhost ~]# [root@localhost ~]# ls -alZ /dev/bus/usb/002/002 crw-rw-r--. root root system_u:object_r:usb_device_t:s0 /dev/bus/usb/002/002 usb device is changed back to original permission and SELinux context. 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://rhn.redhat.com/errata/RHSA-2016-2577.html |