From: Ben Hutchings Date: Wed, 5 Jul 2017 12:32:43 +0000 (+0100) Subject: mmap: Remember the MAP_FIXED flag as VM_FIXED X-Git-Tag: archive/raspbian/4.9.82-1+deb9u3+rpi1_jessie~8^2~54 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e992f768d86f91b6e0ca54f4ef3c5e94cae13e0e;p=linux-4.9.git mmap: Remember the MAP_FIXED flag as VM_FIXED Signed-off-by: Ben Hutchings Gbp-Pq: Topic bugfix/x86 Gbp-Pq: Name mmap-remember-the-map_fixed-flag-as-vm_fixed.patch --- diff --git a/include/linux/mm.h b/include/linux/mm.h index 140a8833e187..d8946909a756 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -182,6 +182,7 @@ extern unsigned int kobjsize(const void *objp); #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */ #define VM_NORESERVE 0x00200000 /* should the VM suppress accounting */ #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ +#define VM_FIXED 0x00800000 /* Allocated at fixed address */ #define VM_ARCH_1 0x01000000 /* Architecture-specific flag */ #define VM_ARCH_2 0x02000000 #define VM_DONTDUMP 0x04000000 /* Do not include in the core dump */ diff --git a/include/linux/mman.h b/include/linux/mman.h index c540001ca861..d14679e5d864 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h @@ -87,7 +87,8 @@ calc_vm_flag_bits(unsigned long flags) { return _calc_vm_trans(flags, MAP_GROWSDOWN, VM_GROWSDOWN ) | _calc_vm_trans(flags, MAP_DENYWRITE, VM_DENYWRITE ) | - _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ); + _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ) | + _calc_vm_trans(flags, MAP_FIXED, VM_FIXED ); } unsigned long vm_commit_limit(void);