]> git.ipfire.org Git - thirdparty/libvirt.git/commit
lxc_cgroup: Add check for NULL cgroup before AddTask call
authorJohn Ferlan <jferlan@redhat.com>
Fri, 18 Dec 2015 13:25:47 +0000 (08:25 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 18 Dec 2015 13:59:34 +0000 (08:59 -0500)
commitae09988eb787df63d3bb298f713a3bbd77275901
treebd04fa2aa567ae78ed9f12e5b87e2fe82bae8dd7
parentbe08842e47f0fb96c8b8f45aade65ab720c3a0f3
lxc_cgroup: Add check for NULL cgroup before AddTask call

Commit id '71ce4759' altered the cgroup processing with respect to the
call to virCgroupAddTask being moved out from lower layers into the calling
layers especially for qemu processing of emulator and vcpu threads. The
movement affected lxc insomuch as it is possible for a code path to
return a NULL cgroup *and* a 0 return status via virCgroupNewPartition
failure when virCgroupNewIgnoreError succeeded when virCgroupNewMachineManual
returns. Coverity pointed out that would cause virCgroupAddTask to core.

This patch will check for a NULL cgroup as well as the negative return
and just return the NULL cgroup to the caller (as it would have previously)
src/lxc/lxc_cgroup.c