diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-26 11:26:19 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-26 11:26:19 +0200 |
commit | 88bef5a4074e0568cf54df410f41065c06694d8a (patch) | |
tree | bc4d59f57ce315bcb16dad5491ab9983ab122d8a /mm/mprotect.c | |
parent | 054a3fd824705543322d787893de9f3755151517 (diff) | |
parent | 024e8ac04453b3525448c31ef39848cf675ba6db (diff) | |
download | linux-88bef5a4074e0568cf54df410f41065c06694d8a.tar.gz linux-88bef5a4074e0568cf54df410f41065c06694d8a.tar.bz2 linux-88bef5a4074e0568cf54df410f41065c06694d8a.zip |
Merge branch 'linus' into x86/urgent
Diffstat (limited to 'mm/mprotect.c')
-rw-r--r-- | mm/mprotect.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c index 360d9cc8b38c..abd645a3b0a0 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -153,12 +153,10 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, * If we make a private mapping writable we increase our commit; * but (without finer accounting) cannot reduce our commit if we * make it unwritable again. - * - * FIXME? We haven't defined a VM_NORESERVE flag, so mprotecting - * a MAP_NORESERVE private mapping to writable will now reserve. */ if (newflags & VM_WRITE) { - if (!(oldflags & (VM_ACCOUNT|VM_WRITE|VM_SHARED))) { + if (!(oldflags & (VM_ACCOUNT|VM_WRITE| + VM_SHARED|VM_NORESERVE))) { charged = nrpages; if (security_vm_enough_memory(charged)) return -ENOMEM; |