summarylogtreecommitdiffstats
path: root/nvidia-drivers-pax-constify.patch
blob: 0944dc1baab98bef61ab0079a74ef26c63b50331 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- a/kernel/nvidia-uvm/uvm_common.c
+++ b/kernel/nvidia-uvm/uvm_common.c
@@ -147,9 +147,11 @@ static RM_STATUS uvmSetupGpuProvider(void)
     RM_STATUS status = RM_OK;
 
 #ifdef NVIDIA_UVM_RM_ENABLED
-    g_exportedUvmOps.startDevice = uvm_gpu_event_start_device;
-    g_exportedUvmOps.stopDevice  = uvm_gpu_event_stop_device;
-    g_exportedUvmOps.isrTopHalf  = uvmnext_isr_top_half;
+    static struct UvmOpsUvmEvents g_exportedUvmOps = {
+      .startDevice = uvm_gpu_event_start_device,
+      .stopDevice  = uvm_gpu_event_stop_device,
+      .isrTopHalf  = uvmnext_isr_top_half,
+    };
 
     // call RM to exchange the function pointers.
     status = nvUvmInterfaceRegisterUvmCallbacks(&g_exportedUvmOps);