[libvirt] [PATCH] LXC fix rc handling in lxcVmStart

Daniel Veillard veillard at redhat.com
Tue Oct 13 14:39:54 UTC 2009


On Tue, Oct 13, 2009 at 10:57:13AM +0900, Ryota Ozaki wrote:
> Hi,
> 
> In lxcVmStart we have to set rc = -1 before jumping to the cleanup
> code when a local procedure call fails and the rc is overwritten,
> however, some codes don't observe the rule and so invalid cleanups
> are likely to happen.
> 
> A simple solution for the defect is to add rc = -1 before every
> jumping if needed, however, IMHO, we first should not reuse rc for
> another purpose rather than the return value of lxcVmStart. Instead
> the patch introduces yet another variable for storing only the
> return value of the local procedure calls. By doing so, we don't
> need to care about resetting rc anymore.

  Makes sense, since it's a cleanup/bug fix I commited this now,

   thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list