[libvirt] [PATCH] lxc_cgroup: Add check for NULL cgroup before AddTask call
Daniel P. Berrange
berrange at redhat.com
Fri Dec 18 14:54:11 UTC 2015
On Fri, Dec 18, 2015 at 09:04:15AM -0500, John Ferlan wrote:
> 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)
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
> src/lxc/lxc_cgroup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
ACK
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list