[LTP] [PATCH 2/5] mremap02: Convert to new API
Cyril Hrubis
chrubis@suse.cz
Thu Aug 6 13:50:58 CEST 2026
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 <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list