diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3958-drm-amdgpu-Fix-error-handling-in-amdgpu_ras_recovery.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3958-drm-amdgpu-Fix-error-handling-in-amdgpu_ras_recovery.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3958-drm-amdgpu-Fix-error-handling-in-amdgpu_ras_recovery.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3958-drm-amdgpu-Fix-error-handling-in-amdgpu_ras_recovery.patch new file mode 100644 index 00000000..26c8087a --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3958-drm-amdgpu-Fix-error-handling-in-amdgpu_ras_recovery.patch @@ -0,0 +1,36 @@ +From 886b6a3216b6a7704b1370bba6506f565080315c Mon Sep 17 00:00:00 2001 +From: Felix Kuehling <Felix.Kuehling@amd.com> +Date: Thu, 3 Oct 2019 17:54:57 -0400 +Subject: [PATCH 3958/4256] drm/amdgpu: Fix error handling in + amdgpu_ras_recovery_init + +Don't set a struct pointer to NULL before freeing its members. It's +hard to see what's happening due to a local pointer-to-pointer data +aliasing con->eh_data. + +Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> +Tested-by: Philip Cox <Philip.Cox@amd.com> +Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +index 6fc158391e92..0581004e2ed3 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +@@ -1540,10 +1540,10 @@ int amdgpu_ras_recovery_init(struct amdgpu_device *adev) + release: + amdgpu_ras_release_bad_pages(adev); + free: +- con->eh_data = NULL; + kfree((*data)->bps); + kfree((*data)->bps_bo); + kfree(*data); ++ con->eh_data = NULL; + out: + DRM_WARN("Failed to initialize ras recovery!\n"); + +-- +2.17.1 + |