mirror of https://github.com/torvalds/linux.git
With a large mmap map size, we can overlap with the text area and using MAP_FIXED results in unmapping that area. Switch to MAP_FIXED_NOREPLACE and handle the EEXIST error. Link: https://lkml.kernel.org/r/20210616045239.370802-3-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Reviewed-by: Kalesh Singh <kaleshsingh@google.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Hugh Dickins <hughd@google.com> Cc: Joel Fernandes <joel@joelfernandes.org> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| Makefile | ||
| charge_reserved_hugetlb.sh | ||
| check_config.sh | ||
| compaction_test.c | ||
| config | ||
| gup_test.c | ||
| hmm-tests.c | ||
| hugepage-mmap.c | ||
| hugepage-shm.c | ||
| hugetlb_reparenting_test.sh | ||
| khugepaged.c | ||
| madv_populate.c | ||
| map_fixed_noreplace.c | ||
| map_hugetlb.c | ||
| map_populate.c | ||
| memfd_secret.c | ||
| mlock-random-test.c | ||
| mlock2-tests.c | ||
| mlock2.h | ||
| mremap_dontunmap.c | ||
| mremap_test.c | ||
| on-fault-limit.c | ||
| pkey-helpers.h | ||
| pkey-powerpc.h | ||
| pkey-x86.h | ||
| protection_keys.c | ||
| run_vmtests.sh | ||
| split_huge_page_test.c | ||
| test_hmm.sh | ||
| test_vmalloc.sh | ||
| thuge-gen.c | ||
| transhuge-stress.c | ||
| userfaultfd.c | ||
| va_128TBswitch.c | ||
| virtual_address_range.c | ||
| write_hugetlb_memory.sh | ||
| write_to_hugetlbfs.c | ||