]> xenbits.xensource.com Git - libvirt.git/commit
qemu_cgroup: Only try to allow devices if devices CGroup's available
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 22 Feb 2017 14:20:15 +0000 (15:20 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 23 Feb 2017 10:21:26 +0000 (11:21 +0100)
commit3cddd63aec979c98f7ab09e510ba4a777b88b5a8
tree7ef880c8b20da6433a3007e39ab23a671292a3cc
parent5d84f5961b8e28e802f600bb2d2c6903e219092e
qemu_cgroup: Only try to allow devices if devices CGroup's available

When a domain needs an access to some device (be it a disk, RNG,
chardev, whatever), we have to allow it in the devices CGroup (if
it is available), because by default we disallow all the devices.
But some of the functions that are responsible for setting up
devices CGroup are lacking check whether there is any CGroup
available. Thus users might be unable to hotplug some devices:

  virsh # attach-device fedora rng.xml
  error: Failed to attach device from rng.xml
  error: internal error: Controller 'devices' is not mounted

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_cgroup.c