r2006 - trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches

Andres Salomon dilinger-guest@haydn.debian.org
Thu, 16 Dec 2004 01:20:44 -0700


Author: dilinger-guest
Date: 2004-12-16 01:20:37 -0700 (Thu, 16 Dec 2004)
New Revision: 2006

Modified:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/binfmt-huge-vma-dos2.dpatch
Log:
fix rejects w/ arch-specific fixes


Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/binfmt-huge-vma-dos2.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/binfmt-huge-vma-dos2.dpatch	2004-12-16 07:55:50 UTC (rev 2005)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/binfmt-huge-vma-dos2.dpatch	2004-12-16 08:20:37 UTC (rev 2006)
@@ -59,6 +59,8 @@
 #   2004/11/24 22:42:43-08:00 nanhai.zou@intel.com +3 -2
 #   ia64/x86_64/s390 overlapping vma fix
 # 
+# Modified by Andres Salomon to apply to debian's 2.6.8 kernel.
+#
 diff -Nru a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c
 --- a/arch/ia64/ia32/binfmt_elf32.c	2004-12-15 23:41:30 -08:00
 +++ b/arch/ia64/ia32/binfmt_elf32.c	2004-12-15 23:41:30 -08:00
@@ -75,19 +77,6 @@
  		}
  		up_write(&current->mm->mmap_sem);
  	}
-@@ -123,7 +127,11 @@
- 		vma->vm_ops = &ia32_gate_page_vm_ops;
- 		down_write(&current->mm->mmap_sem);
- 		{
--			insert_vm_struct(current->mm, vma);
-+			if (insert_vm_struct(current->mm, vma)) {
-+				kmem_cache_free(vm_area_cachep, vma);
-+				up_write(&current->mm->mmap_sem);
-+				return;
-+			}
- 		}
- 		up_write(&current->mm->mmap_sem);
- 	}
 @@ -142,7 +150,11 @@
  		vma->vm_flags = VM_READ|VM_WRITE|VM_MAYREAD|VM_MAYWRITE;
  		down_write(&current->mm->mmap_sem);
@@ -120,7 +109,7 @@
 +			kmem_cache_free(vm_area_cachep, mpnt);
 +			return ret;
 +		}
- 		current->mm->stack_vm = current->mm->total_vm = vma_pages(mpnt);
+ 		current->mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
  	}
  
 diff -Nru a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
@@ -178,7 +167,7 @@
 +			kmem_cache_free(vm_area_cachep, mpnt);
 +			return ret;
 +		}
- 		mm->stack_vm = mm->total_vm = vma_pages(mpnt);
+ 		mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
  	} 
  
 diff -Nru a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
@@ -203,7 +192,7 @@
 +			kmem_cache_free(vm_area_cachep, mpnt);
 +			return ret;
 +		}
- 		mm->stack_vm = mm->total_vm = vma_pages(mpnt);
+ 		mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
  	} 
  
 diff -Nru a/fs/exec.c b/fs/exec.c
@@ -239,7 +228,7 @@
 +			return ret;
  		}
 -		insert_vm_struct(mm, mpnt);
- 		mm->stack_vm = mm->total_vm = vma_pages(mpnt);
+ 		mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
  	}
  
 diff -Nru a/include/linux/mm.h b/include/linux/mm.h