aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4033-drm-amdgpu-fix-uninitialized-variable-pasid_mapping_.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4033-drm-amdgpu-fix-uninitialized-variable-pasid_mapping_.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4033-drm-amdgpu-fix-uninitialized-variable-pasid_mapping_.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4033-drm-amdgpu-fix-uninitialized-variable-pasid_mapping_.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4033-drm-amdgpu-fix-uninitialized-variable-pasid_mapping_.patch
new file mode 100644
index 00000000..85dd7470
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4033-drm-amdgpu-fix-uninitialized-variable-pasid_mapping_.patch
@@ -0,0 +1,39 @@
+From 5a11480c4166d4c53ad10021c1c23c901ded7805 Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.king@canonical.com>
+Date: Thu, 3 Oct 2019 22:52:27 +0100
+Subject: [PATCH 4033/4256] drm/amdgpu: fix uninitialized variable
+ pasid_mapping_needed
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The boolean variable pasid_mapping_needed is not initialized and
+there are code paths that do not assign it any value before it is
+is read later. Fix this by initializing pasid_mapping_needed to
+false.
+
+Addresses-Coverity: ("Uninitialized scalar variable")
+Fixes: 6817bf283b2b ("drm/amdgpu: grab the id mgr lock while accessing passid_mapping")
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+index 8566f6b0729a..af4fda196c7d 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+@@ -1052,7 +1052,7 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job,
+ id->oa_size != job->oa_size);
+ bool vm_flush_needed = job->vm_needs_flush;
+ struct dma_fence *fence = NULL;
+- bool pasid_mapping_needed;
++ bool pasid_mapping_needed = false;
+ unsigned patch_offset = 0;
+ int r;
+
+--
+2.17.1
+