X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=mm%2Fmprotect.c;h=abd645a3b0a021bb34d5de49cff94efae109966c;hb=45e96f26f257bd873017c6244a6cafd27f6f5439;hp=360d9cc8b38c061185d562fc40b7f032ae34d21d;hpb=49997d75152b3d23c53b0fa730599f2f74c92c65;p=linux-2.6-omap-h63xx.git diff --git a/mm/mprotect.c b/mm/mprotect.c index 360d9cc8b38..abd645a3b0a 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;