mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-22 13:18:25 +07:00
![]() Man page of mmap() says that portable applications should ensure fd argument to be -1 if MAP_ANONYMOUS flag is set as below: ``` The mapping is not backed by any file; its contents are initialized to zero. The fd and offset arguments are ignored; however, some implementations require fd to be -1 if MAP_ANONYMOUS (or MAP_ANON) is specified, and portable applications should ensure this. ``` However, few mmap() calls under selftests/vm/ uses 0 as fd though they use MAP_ANONYMOUS flag. This commit changes the argument to be -1 as recommended. Signed-off-by: SeongJae Park <sj38.park@gmail.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> |
||
---|---|---|
.. | ||
.gitignore | ||
compaction_test.c | ||
config | ||
hugepage-mmap.c | ||
hugepage-shm.c | ||
Makefile | ||
map_hugetlb.c | ||
mlock2-tests.c | ||
mlock2.h | ||
mlock-random-test.c | ||
on-fault-limit.c | ||
run_vmtests | ||
thuge-gen.c | ||
transhuge-stress.c | ||
userfaultfd.c |