summaryrefslogtreecommitdiff
path: root/x11-drivers/nvidia-drivers/files/nvidia-drivers-pax-const.patch
blob: f3b82593570ea62a23e24f5e3e298ee18ae1274e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Binary files kernel.orig/.nv-procfs.c.swp and kernel/.nv-procfs.c.swp differ
diff -urp kernel.orig/nv-procfs.c kernel/nv-procfs.c
--- kernel.orig/nv-procfs.c	2011-07-13 03:29:30.000000000 +0200
+++ kernel/nv-procfs.c	2011-07-19 15:45:27.982993911 +0200
@@ -707,8 +707,10 @@ int nv_register_procfs(void)
      * However, in preparation for this, we need to preserve
      * the procfs read() and write() operations.
      */
-    nv_procfs_registry_fops.read = entry->proc_fops->read;
-    nv_procfs_registry_fops.write = entry->proc_fops->write;
+    pax_open_kernel();
+    *(void **)&nv_procfs_registry_fops.read = entry->proc_fops->read;
+    *(void **)&nv_procfs_registry_fops.write = entry->proc_fops->write;
+    pax_close_kernel();
 
     entry = NV_CREATE_PROC_FILE("registry", proc_nvidia,
         nv_procfs_read_registry,