mm: ignore MAP_DENYWRITE in ksys_mmap_pgoff()
authorDavid Hildenbrand <david@redhat.com>
Fri, 23 Apr 2021 07:38:14 +0000 (09:38 +0200)
committerDavid Hildenbrand <david@redhat.com>
Fri, 3 Sep 2021 16:42:01 +0000 (18:42 +0200)
commit6128b3af2a5e42386aa7faf37609b57f39fb7d00
tree6b563660608582f8b1e50e43ee1df97e6028e611
parent8d0920bde5eb8ec7e567939b85e65a0596c8580d
mm: ignore MAP_DENYWRITE in ksys_mmap_pgoff()

Let's also remove masking off MAP_DENYWRITE from ksys_mmap_pgoff():
the last in-tree occurrence of MAP_DENYWRITE is now in LEGACY_MAP_MASK,
which accepts the flag e.g., for MAP_SHARED_VALIDATE; however, the flag
is ignored throughout the kernel now.

Add a comment to LEGACY_MAP_MASK stating that MAP_DENYWRITE is ignored.

Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
include/linux/mman.h
mm/mmap.c
mm/nommu.c