]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Call qemuSetupHostdevCGroup later during hotplug
authorJiri Denemark <jdenemar@redhat.com>
Thu, 14 Nov 2013 11:02:40 +0000 (12:02 +0100)
committerCole Robinson <crobinso@redhat.com>
Mon, 9 Dec 2013 22:24:37 +0000 (17:24 -0500)
commite7e2720b37ade86920a090e0085c4d9f732860ce
treee8b2af1a8cd3b33aa3e060b430c10aa2d41653dd
parent93ce06b707dd56d4caee26e04329991aaa5f5c0b
qemu: Call qemuSetupHostdevCGroup later during hotplug

https://bugzilla.redhat.com/show_bug.cgi?id=1025108

So far qemuSetupHostdevCGroup was called very early during hotplug, even
before we knew the device we were about to hotplug was actually
available. By calling the function later, we make sure QEMU won't be
allowed to access devices used by other domains.

Another important effect of this change is that hopluging USB devices
specified by vendor and product (but not by their USB address) works
again. This was broken since v1.0.5-171-g7d763ac, when the call to
qemuFindHostdevUSBDevice was moved after the call to
qemuSetupHostdevCGroup, which then used an uninitialized USB address.

(cherry picked from commit 05e149f94cbd34e4c3d4e9c7f6871e13cfe03d8c)
src/qemu/qemu_hotplug.c