[Devel] [patch rh7 2/2] ve: ioctls -- call put_ve in real_env_create
Cyrill Gorcunov
gorcunov at odin.com
Thu May 7 01:05:59 PDT 2015
On Tue, May 05, 2015 at 08:02:08PM +0300, Cyrill Gorcunov wrote:
> Our cgroups based VE's aleady carrying own reference
> so here we should call for put_ve, otherwise it gonna
> be hangin around.
>
> p.s. I didn't hit any problem with it yet because we're
> operating via cgroups interface now but if I'm not missing
> something obvious we're doing redunt get_ve here so call
> put one for balance. Found when been hunting another bug.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at odin.com>
> CC: Vladimir Davydov <vdavydov at odin.com>
> CC: Konstantin Khorenko <khorenko at odin.com>
> CC: Pavel Emelyanov <xemul at odin.com>
> CC: Andrey Vagin <avagin at odin.com>
I believe this requires some more comments on why it's not
needed in pcs6. In pcs6 the usage of ve is tracked via
ve::counte, thus when we create new VE via this ioctl
interface we set counter to 1 and it gonna be decremented
upon ve destruction. In turn in pcs7 we track ve usage
via cgroup counter so that once ve is created it takes
cgroup reference but also it grabs the context waiting
the ve to be destoryed in ve_exit_ns. Thus as far as I
understand old ioctl interface brings additional ve
increment if used. Note at the moment our vzctl code
doesn't create ve via this ioctl interface but uses
cgroups directly (as it should). Still worth to fix
i think.
More information about the Devel
mailing list