diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-12 07:08:57 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-12 07:08:57 -0500 |
commit | 871cafcc962fa1655c44b4f0e54d4c5cc14e273c (patch) | |
tree | fdb7bc65d2606c85b7be6c33ba0dfd5b4e472245 /mm/mprotect.c | |
parent | cf2592f59c0e8ed4308adbdb2e0a88655379d579 (diff) | |
parent | b578f3fcca1e78624dfb5f358776e63711d7fda2 (diff) |
Merge branch 'linus' into core/softlockup
Diffstat (limited to 'mm/mprotect.c')
-rw-r--r-- | mm/mprotect.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c index d0f6e7ce09f1..258197b76fb4 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c | |||
@@ -151,10 +151,11 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, | |||
151 | /* | 151 | /* |
152 | * If we make a private mapping writable we increase our commit; | 152 | * If we make a private mapping writable we increase our commit; |
153 | * but (without finer accounting) cannot reduce our commit if we | 153 | * but (without finer accounting) cannot reduce our commit if we |
154 | * make it unwritable again. | 154 | * make it unwritable again. hugetlb mapping were accounted for |
155 | * even if read-only so there is no need to account for them here | ||
155 | */ | 156 | */ |
156 | if (newflags & VM_WRITE) { | 157 | if (newflags & VM_WRITE) { |
157 | if (!(oldflags & (VM_ACCOUNT|VM_WRITE| | 158 | if (!(oldflags & (VM_ACCOUNT|VM_WRITE|VM_HUGETLB| |
158 | VM_SHARED|VM_NORESERVE))) { | 159 | VM_SHARED|VM_NORESERVE))) { |
159 | charged = nrpages; | 160 | charged = nrpages; |
160 | if (security_vm_enough_memory(charged)) | 161 | if (security_vm_enough_memory(charged)) |
@@ -217,8 +218,8 @@ fail: | |||
217 | return error; | 218 | return error; |
218 | } | 219 | } |
219 | 220 | ||
220 | asmlinkage long | 221 | SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len, |
221 | sys_mprotect(unsigned long start, size_t len, unsigned long prot) | 222 | unsigned long, prot) |
222 | { | 223 | { |
223 | unsigned long vm_flags, nstart, end, tmp, reqprot; | 224 | unsigned long vm_flags, nstart, end, tmp, reqprot; |
224 | struct vm_area_struct *vma, *prev; | 225 | struct vm_area_struct *vma, *prev; |