Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14604
b: refs/heads/master
c: 83e9b7e
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Nov 22, 2005
1 parent d969f0f commit ee5a550
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ed5297a94090d9a9f27b0ce1f9601ebe73561cff
refs/heads/master: 83e9b7e929d1323b9a155d186f77aa8c06155cc3
11 changes: 0 additions & 11 deletions trunk/mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1076,17 +1076,6 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
error = file->f_op->mmap(file, vma);
if (error)
goto unmap_and_free_vma;
if ((vma->vm_flags & (VM_SHARED | VM_WRITE | VM_RESERVED))
== (VM_WRITE | VM_RESERVED)) {
printk(KERN_WARNING "program %s is using MAP_PRIVATE, "
"PROT_WRITE mmap of VM_RESERVED memory, which "
"is deprecated. Please report this to "
"linux-kernel@vger.kernel.org\n",current->comm);
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
error = -EACCES;
goto unmap_and_free_vma;
}
} else if (vm_flags & VM_SHARED) {
error = shmem_zero_setup(vma);
if (error)
Expand Down
8 changes: 0 additions & 8 deletions trunk/mm/mprotect.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,6 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
* a MAP_NORESERVE private mapping to writable will now reserve.
*/
if (newflags & VM_WRITE) {
if (oldflags & VM_RESERVED) {
BUG_ON(oldflags & VM_WRITE);
printk(KERN_WARNING "program %s is using MAP_PRIVATE, "
"PROT_WRITE mprotect of VM_RESERVED memory, "
"which is deprecated. Please report this to "
"linux-kernel@vger.kernel.org\n",current->comm);
return -EACCES;
}
if (!(oldflags & (VM_ACCOUNT|VM_WRITE|VM_SHARED|VM_HUGETLB))) {
charged = nrpages;
if (security_vm_enough_memory(charged))
Expand Down

0 comments on commit ee5a550

Please sign in to comment.