[LTP] [PATCH] open_posix_testsuite/mmap24-2: Relax condition a bit

Petr Vorel pvorel@suse.cz
Fri Oct 12 18:20:00 CEST 2018


Hi Hongzhi,

> Mips will return EINVAL instead of ENOMEM as expected
> if the range [addr + len) exceeds TASK_SIZE.

> Linux kernel code: arch/mips/mm/mmap.c
> if (flags & MAP_FIXED) {
>     /* Even MAP_FIXED mappings must reside within TASK_SIZE */
>     if (TASK_SIZE - len < addr)
>         return -EINVAL;

> Relax the condition and accept both ENOMEM and EINVAL
> as expected outcome.

> Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Thanks for your patch, LGTM.


Kind regards,
Petr


More information about the ltp mailing list