~ubuntu-branches/ubuntu/wily/nvidia-graphics-drivers-340-updates/wily-proposed

« back to all changes in this revision

Viewing changes to debian/dkms_nvidia/patches/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch

  • Committer: Package Import Robot
  • Author(s): Alberto Milone
  • Date: 2015-02-11 17:24:47 UTC
  • Revision ID: package-import@ubuntu.com-20150211172447-petxn6hj8gow50lg
Tags: 340.76-0ubuntu1
Initial release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From fed1fa17202cf13bf80bbbad3bf0ffdfd192df42 Mon Sep 17 00:00:00 2001
 
2
From: Alberto Milone <alberto.milone@canonical.com>
 
3
Date: Wed, 7 Nov 2012 12:11:02 +0100
 
4
Subject: [PATCH 1/1] Replace VM_RESERVED with VM_DONTEXPAND and VM_DONTDUMP
 
5
 
 
6
---
 
7
 nv-mmap.c |    4 ++++
 
8
 1 file changed, 4 insertions(+)
 
9
 
 
10
diff --git a/nv-mmap.c b/nv-mmap.c
 
11
index acc02ec..b2d5cdb 100644
 
12
--- a/nv-mmap.c
 
13
+++ b/nv-mmap.c
 
14
@@ -463,7 +463,11 @@ int nv_kern_mmap(
 
15
         NV_PRINT_AT(NV_DBG_MEMINFO, at);
 
16
         nv_vm_list_page_count(&at->page_table[i], pages);
 
17
 
 
18
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
 
19
+        vma->vm_flags |= (VM_IO | VM_LOCKED | (VM_DONTEXPAND | VM_DONTDUMP));
 
20
+#else
 
21
         vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED);
 
22
+#endif
 
23
 
 
24
 #if defined(VM_DRIVER_PAGES)
 
25
         vma->vm_flags |= VM_DRIVER_PAGES;
 
26
-- 
 
27
1.7.9.5
 
28