diff options
author | David S. Miller <davem@davemloft.net> | 2018-05-04 09:58:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-04 09:58:56 -0400 |
commit | a7b15ab887e5b8e9803136b5a4a0008d7a3dea86 (patch) | |
tree | ca5342d29badb2a3cce2a353b786c8ab4a993c1e /mm/mmap.c | |
parent | b05f03b232ab4f8f173eeae291a4c9cd662a6676 (diff) | |
parent | 1504269814263c9676b4605a6a91e14dc6ceac21 (diff) | |
download | linux-a7b15ab887e5b8e9803136b5a4a0008d7a3dea86.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Overlapping changes in selftests Makefile.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mm/mmap.c b/mm/mmap.c index 188f195883b9..9d5968d1e8e3 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -100,11 +100,20 @@ pgprot_t protection_map[16] __ro_after_init = { __S000, __S001, __S010, __S011, __S100, __S101, __S110, __S111 }; +#ifndef CONFIG_ARCH_HAS_FILTER_PGPROT +static inline pgprot_t arch_filter_pgprot(pgprot_t prot) +{ + return prot; +} +#endif + pgprot_t vm_get_page_prot(unsigned long vm_flags) { - return __pgprot(pgprot_val(protection_map[vm_flags & + pgprot_t ret = __pgprot(pgprot_val(protection_map[vm_flags & (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]) | pgprot_val(arch_vm_get_page_prot(vm_flags))); + + return arch_filter_pgprot(ret); } EXPORT_SYMBOL(vm_get_page_prot); |