Author: dannf
Date: Tue Feb 19 07:59:27 2008
New Revision: 10579

Log:
patch ported to 2.6.8

Modified:
   
dists/sarge-security/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/mmap-VM_DONTEXPAND.dpatch

Modified: 
dists/sarge-security/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/mmap-VM_DONTEXPAND.dpatch
==============================================================================
--- 
dists/sarge-security/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/mmap-VM_DONTEXPAND.dpatch
       (original)
+++ 
dists/sarge-security/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/mmap-VM_DONTEXPAND.dpatch
       Tue Feb 19 07:59:27 2008
@@ -34,51 +34,42 @@
 
 Ported to Debian's 2.6.8 by dann frazier <[EMAIL PROTECTED]>
 
-diff --git a/drivers/char/drm-4.0/vm.c b/drivers/char/drm-4.0/vm.c
-index f25aaa5..ef50f2d 100644
---- a/drivers/char/drm-4.0/vm.c
-+++ b/drivers/char/drm-4.0/vm.c
-@@ -256,6 +256,7 @@ int drm_mmap_dma(struct file *filp, struct vm_area_struct 
*vma)
- 
-       vma->vm_ops   = &drm_vm_dma_ops;
-       vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
-+      vma->vm_flags |= VM_DONTEXPAND;
-       
- #if LINUX_VERSION_CODE < 0x020203 /* KERNEL_VERSION(2,2,3) */
-                               /* In Linux 2.2.3 and above, this is
-@@ -358,6 +359,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
-               return -EINVAL; /* This should never happen. */
-       }
+diff -urpN kernel-source-2.6.8.orig/drivers/char/drm/drm_vm.h 
kernel-source-2.6.8/drivers/char/drm/drm_vm.h
+--- kernel-source-2.6.8.orig/drivers/char/drm/drm_vm.h 2004-08-13 
23:38:10.000000000 -0600
++++ kernel-source-2.6.8/drivers/char/drm/drm_vm.h      2008-02-19 
00:14:33.000000000 -0700
+@@ -481,6 +481,7 @@ int DRM(mmap_dma)(struct file *filp, str
        vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
-+      vma->vm_flags |= VM_DONTEXPAND;
- 
- #if LINUX_VERSION_CODE < 0x020203 /* KERNEL_VERSION(2,2,3) */
-                               /* In Linux 2.2.3 and above, this is
-diff --git a/drivers/char/drm/drm_vm.h b/drivers/char/drm/drm_vm.h
-index 4eadbf0..337a1a8 100644
---- a/drivers/char/drm/drm_vm.h
-+++ b/drivers/char/drm/drm_vm.h
-@@ -342,6 +342,7 @@ int DRM(mmap_dma)(struct file *filp, struct vm_area_struct 
*vma)
- 
-       vma->vm_ops   = &DRM(vm_dma_ops);
+ #else
        vma->vm_flags |= VM_RESERVED; /* Don't swap */
 +      vma->vm_flags |= VM_DONTEXPAND;
+ #endif
+ 
        vma->vm_file  =  filp;  /* Needed for drm_vm_open() */
-       DRM(vm_open)(vma);
-       return 0;
-@@ -475,6 +476,7 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct 
*vma)
-               return -EINVAL; /* This should never happen. */
-       }
+@@ -655,6 +656,7 @@ int DRM(mmap)(struct file *filp, struct 
+       vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
+ #else
        vma->vm_flags |= VM_RESERVED; /* Don't swap */
 +      vma->vm_flags |= VM_DONTEXPAND;
+ #endif
  
        vma->vm_file  =  filp;  /* Needed for drm_vm_open() */
-       DRM(vm_open)(vma);
-diff --git a/drivers/sound/via82cxxx_audio.c b/drivers/sound/via82cxxx_audio.c
-index 864f164..db5da3c 100644
---- a/drivers/sound/via82cxxx_audio.c
-+++ b/drivers/sound/via82cxxx_audio.c
-@@ -2111,6 +2111,7 @@ static struct page * via_mm_nopage (struct 
vm_area_struct * vma,
+diff -urpN kernel-source-2.6.8.orig/fs/ncpfs/mmap.c 
kernel-source-2.6.8/fs/ncpfs/mmap.c
+--- kernel-source-2.6.8.orig/fs/ncpfs/mmap.c   2004-08-13 23:37:26.000000000 
-0600
++++ kernel-source-2.6.8/fs/ncpfs/mmap.c        2008-02-19 00:11:29.000000000 
-0700
+@@ -47,9 +47,6 @@ static struct page* ncp_file_mmap_nopage
+       pos = address - area->vm_start + (area->vm_pgoff << PAGE_SHIFT);
+ 
+       count = PAGE_SIZE;
+-      if (address + PAGE_SIZE > area->vm_end) {
+-              count = area->vm_end - address;
+-      }
+       /* what we can read in one go */
+       bufsize = NCP_SERVER(inode)->buffer_size;
+ 
+diff -urpN kernel-source-2.6.8.orig/sound/oss/via82cxxx_audio.c 
kernel-source-2.6.8/sound/oss/via82cxxx_audio.c
+--- kernel-source-2.6.8.orig/sound/oss/via82cxxx_audio.c       2004-08-13 
23:36:44.000000000 -0600
++++ kernel-source-2.6.8/sound/oss/via82cxxx_audio.c    2008-02-19 
00:11:29.000000000 -0700
+@@ -2119,6 +2119,7 @@ static struct page * via_mm_nopage (stru
  {
        struct via_info *card = vma->vm_private_data;
        struct via_channel *chan = &card->ch_out;
@@ -86,7 +77,7 @@
        struct page *dmapage;
        unsigned long pgoff;
        int rd, wr;
-@@ -2135,14 +2136,11 @@ static struct page * via_mm_nopage (struct 
vm_area_struct * vma,
+@@ -2142,14 +2143,11 @@ static struct page * via_mm_nopage (stru
        rd = card->ch_in.is_mapped;
        wr = card->ch_out.is_mapped;
  
@@ -106,17 +97,3 @@
  
        /* if full-duplex (read+write) and we have two sets of bufs,
         * then the playback buffers come first, sez soundcard.c */
-diff --git a/fs/ncpfs/mmap.c b/fs/ncpfs/mmap.c
-index 7d9bc34..dd8cb1a 100644
---- a/fs/ncpfs/mmap.c
-+++ b/fs/ncpfs/mmap.c
-@@ -47,9 +47,6 @@ static struct page* ncp_file_mmap_nopage(struct 
vm_area_struct *area,
-       pos = address - area->vm_start + (area->vm_pgoff << PAGE_SHIFT);
- 
-       count = PAGE_SIZE;
--      if (address + PAGE_SIZE > area->vm_end) {
--              count = area->vm_end - address;
--      }
-       /* what we can read in one go */
-       bufsize = NCP_SERVER(inode)->buffer_size;
- 

_______________________________________________
Kernel-svn-changes mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/kernel-svn-changes

Reply via email to