Skip to contentSkip to conversation

rmap 29 VM_RESERVED safety

PATCH In review [email protected] 1 participant 1 message May 22, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 45/57 rmap 29 VM_RESERVED safety

From: Hugh Dickins <[email protected]>

From: Andrea Arcangeli <[email protected]>

Set VM_RESERVED in videobuf_mmap_mapper, to warn do_no_page and swapout not to worry about its pages. Set VM_RESERVED in ia64_elf32_init, it too provides an unusual nopage which might surprise higher level checks. Future safety: they don't actually pose a problem in this current tree.

---

 25-akpm/arch/ia64/ia32/binfmt_elf32.c   |    2 +-
 25-akpm/drivers/media/video/video-buf.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/ia64/ia32/binfmt_elf32.c renamed from arch/ia64/ia32/binfmt_elf32.c~rmap-29-vm_reserved-safety +1 -1
diff -puN arch/ia64/ia32/binfmt_elf32.c~rmap-29-vm_reserved-safety arch/ia64/ia32/binfmt_elf32.c
@@ -79,7 +79,7 @@ ia64_elf32_init (struct pt_regs *regs)
 		vma->vm_start = IA32_GDT_OFFSET;
 		vma->vm_end = vma->vm_start + PAGE_SIZE;
 		vma->vm_page_prot = PAGE_SHARED;
-		vma->vm_flags = VM_READ|VM_MAYREAD;
+		vma->vm_flags = VM_READ|VM_MAYREAD|VM_RESERVED;
 		vma->vm_ops = &ia32_shared_page_vm_ops;
 		down_write(&current->mm->mmap_sem);
 		{
drivers/media/video/video-buf.c renamed from drivers/media/video/video-buf.c~rmap-29-vm_reserved-safety +1 -1
diff -puN drivers/media/video/video-buf.c~rmap-29-vm_reserved-safety drivers/media/video/video-buf.c
@@ -1176,7 +1176,7 @@ int videobuf_mmap_mapper(struct vm_area_
 	map->end      = vma->vm_end;
 	map->q        = q;
 	vma->vm_ops   = &videobuf_vm_ops;
-	vma->vm_flags |= VM_DONTEXPAND;
+	vma->vm_flags |= VM_DONTEXPAND | VM_RESERVED;
 	vma->vm_flags &= ~VM_IO; /* using shared anonymous pages */
 	vma->vm_private_data = map;
 	dprintk(1,"mmap %p: %08lx-%08lx pgoff %08lx bufs %d-%d\n",

_
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>