SHA256
1
0
forked from pool/libvirt
libvirt/f493d83f-cgroup-swap-control.patch
James Fehlig 8806eb20b1 - fix leak after listing all volumes - CVE-2013-1962
ca697e90-CVE-2013-1962.patch
  bnc#820397
- Fix iohelper usage with streams opened for read
  a2214c52-iohelper.patch
- Cope with missing swap cgroup controls
  f493d83f-cgroup-swap-control.patch
  bnc#819976
- Fix cgroup handling when setting VCPU BW
  0471637d-cgroups-vcpu-bw.patch
  rhb#963592
- Escape a leading '.' with '_' in the cgroup names
  0ced83dc-cgroup-escape-dot.patch
- Add missing documentation on new cgroup layout
  486a86eb-cgroups-docs.patch
- Another fix related to systems with no cgroups
  c2cf5f1c-no-cgroups-fix.patch
  bnc#819963

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=264
2013-05-18 15:17:46 +00:00

35 lines
1.5 KiB
Diff

commit f493d83fbd3257453e63f2f32ee90a216fd531c1
Author: Daniel P. Berrange <berrange@redhat.com>
Date: Thu May 9 13:53:39 2013 +0100
Cope with missing swap cgroup controls
It is possible to build a kernel without swap cgroup controls
present. This causes a fatal error when querying memory
parameters. Treat missing swap controls as meaning "unlimited".
The fatal error remains if the user tries to actually change
the limit.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Index: libvirt-1.0.5/src/qemu/qemu_driver.c
===================================================================
--- libvirt-1.0.5.orig/src/qemu/qemu_driver.c
+++ libvirt-1.0.5/src/qemu/qemu_driver.c
@@ -7351,9 +7351,12 @@ qemuDomainGetMemoryParameters(virDomainP
case 2: /* fill swap hard limit here */
rc = virCgroupGetMemSwapHardLimit(priv->cgroup, &val);
if (rc != 0) {
- virReportSystemError(-rc, "%s",
- _("unable to get swap hard limit"));
- goto cleanup;
+ if (rc != -ENOENT) {
+ virReportSystemError(-rc, "%s",
+ _("unable to get swap hard limit"));
+ goto cleanup;
+ }
+ val = VIR_DOMAIN_MEMORY_PARAM_UNLIMITED;
}
if (virTypedParameterAssign(param,
VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT,