[CRIU] [PATCH] pagema-cache: Don't exceed task size on hight bound
Pavel Emelyanov
xemul at parallels.com
Tue Feb 18 07:45:38 PST 2014
On 02/18/2014 07:36 PM, Cyrill Gorcunov wrote:
> On Tue, Feb 18, 2014 at 07:23:52PM +0400, Pavel Emelyanov wrote:
>> On 02/18/2014 05:29 PM, Cyrill Gorcunov wrote:
>>> If area is close to TASK_SIZE limit the high address
>>> may exceed it returning error once we try to read
>>> pagemap file. So limit the high address.
>>
>> Does it fix the error I sent to you?
>
> Yes it should.
>
>>> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
>>> ---
>>> pagemap-cache.c | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/pagemap-cache.c b/pagemap-cache.c
>>> index 904347fc9ded..b102345cae6e 100644
>>> --- a/pagemap-cache.c
>>> +++ b/pagemap-cache.c
>>> @@ -66,6 +66,9 @@ static int pmc_fill_cache(pmc_t *pmc, struct vma_area *vma)
>>> size_t len = vma_area_len(vma);
>>> size_t size_map;
>>>
>>> + if (high > TASK_SIZE)
>>> + high = TASK_SIZE;
>>
>> Is it the proper place? What if we attach yet another vma and move the
>> pmc->end right, should we limit it as well?
>
> I think so. The @high is a bound for cache. The VMAs we're caching and
> writing to image are never exceed TASK_SIZE.
> .
>
OK, applied
More information about the CRIU
mailing list