diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2958-drm-amdgpu-fix-NULL-err-for-sriov-detect.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2958-drm-amdgpu-fix-NULL-err-for-sriov-detect.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2958-drm-amdgpu-fix-NULL-err-for-sriov-detect.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2958-drm-amdgpu-fix-NULL-err-for-sriov-detect.patch new file mode 100644 index 00000000..ecce1c14 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2958-drm-amdgpu-fix-NULL-err-for-sriov-detect.patch @@ -0,0 +1,45 @@ +From a584f8ef9e031a9a250b401383ec77da2c8a3314 Mon Sep 17 00:00:00 2001 +From: Chunming Zhou <david1.zhou@amd.com> +Date: Wed, 13 Dec 2017 17:02:03 +0800 +Subject: [PATCH 2958/4131] drm/amdgpu: fix NULL err for sriov detect + +[ 21.841536] BUG: KASAN: null-ptr-deref in soc15_set_ip_blocks+0x4f/0x2e0 [amdgpu] + +Change-Id: I182dfed95c362123a75feafe44fa2ad3f3f35cac +Signed-off-by: Chunming Zhou <david1.zhou@amd.com> +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/soc15.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c +index 388e754..56dec06 100644 +--- a/drivers/gpu/drm/amd/amdgpu/soc15.c ++++ b/drivers/gpu/drm/amd/amdgpu/soc15.c +@@ -521,6 +521,11 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev) + return -EINVAL; + } + ++ if (adev->flags & AMD_IS_APU) ++ adev->nbio_funcs = &nbio_v7_0_funcs; ++ else ++ adev->nbio_funcs = &nbio_v6_1_funcs; ++ + adev->nbio_funcs->detect_hw_virt(adev); + + if (amdgpu_sriov_vf(adev)) +@@ -611,11 +616,6 @@ static int soc15_common_early_init(void *handle) + + adev->asic_funcs = &soc15_asic_funcs; + +- if (adev->flags & AMD_IS_APU) +- adev->nbio_funcs = &nbio_v7_0_funcs; +- else +- adev->nbio_funcs = &nbio_v6_1_funcs; +- + if (amdgpu_get_ip_block(adev, AMD_IP_BLOCK_TYPE_PSP) && + (amdgpu_ip_block_mask & (1 << AMD_IP_BLOCK_TYPE_PSP))) + psp_enabled = true; +-- +2.7.4 + |