Re: [LTP] [PATCH 2/5] mremap02: Convert to new API

Cyril Hrubis <[email protected]>
Newsgroups it.linux.lists.ltp
Message-ID <anR1Is0EQYGj6nvv@rei>
Hi!
> -	/* Set the old virtual memory address */
> -	addr = (char *)(addr + (memsize - 1));
> +	if (TST_RET_PTR != MAP_FAILED)
> +		SAFE_MUNMAP(TST_RET_PTR, new_size);

If we managed to remap the mapping the addr is no loger valid and we
will pass address that is not inside a mapping on next iteration in -i
10, I guess that we need to re-initialize page = SAFE_MMAP() and
bad_addr = page+1;


Otherwise:

Reviewed-by: Cyril Hrubis <[email protected]>

-- 
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.