[CRIU] [PATCH] restorer: rework unmaping old VMA-s (v3)

Andrew Vagin avagin at parallels.com
Fri Sep 20 13:28:25 EDT 2013


On Fri, Sep 20, 2013 at 08:13:26PM +0400, Pavel Emelyanov wrote:
> On 09/20/2013 08:10 PM, Andrey Vagin wrote:
> > All process VMA-s are in "premmaped area". All restorer stuff are in
> > bootstap "area", so we have two areas.
> > 
> > So we don't need to unmap extra VMA-s one by one. We can call munmap
> > three times for the region before the first area, for the hole between
> > areas and for the region after the second area.
> > 
> > The old scheme didn't work, because the list of VMA-s can be changed
> > after collecting. It can be due to memory allocations by libc or due to
> > increased stack.
> > 
> > v2: improve readability at the expense of beautiness
> > v3: print return code of munmap in error messages
> > Signed-off-by: Andrey Vagin <avagin at openvz.org>
> 
>   CC       pie/restorer.o
> pie/restorer.c: In function ‘__export_restore_task’:
> pie/restorer.c:600:5: error: ‘bootstrap_start’ undeclared (first use in this function)
> pie/restorer.c:600:5: note: each undeclared identifier is reported only once for each function it appears in
> pie/restorer.c:600:22: error: ‘bootstrap_len’ undeclared (first use in this function)

Sorry. I found the problem, when I wrote a test to check that restorer
blob is unmapped after restore, so this patch is applied above
[PATCH 0/8] Unmap restorer blobs after restoring processes (v2)

I'm going to resend this patch and the test as a part of that series in the next
time.

Thanks


More information about the CRIU mailing list