[libvirt] [PATCH] qemu: Call qemuSetupHostdevCGroup later during hotplug

Peter Krempa pkrempa at redhat.com
Fri Nov 15 10:34:33 UTC 2013


On 11/14/13 15:04, Jiri Denemark wrote:
> 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.
> 
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
>  src/qemu/qemu_hotplug.c | 36 +++++++++++++++++++++++++++---------
>  1 file changed, 27 insertions(+), 9 deletions(-)
> 

Insisting on doing the test with LD_PRELOAD as Dan suggested would be
kind of madness in this case when considering the complexity of the test.

ACK to the code changes.

Peter


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131115/86aa5cc3/attachment-0001.sig>


More information about the libvir-list mailing list