OSDN Git Service

drm/amdgpu: fixx NULL pointer deref in gmc_v9_0_get_vm_pte
authorChristian König <christian.koenig@amd.com>
Wed, 7 Dec 2022 07:47:30 +0000 (08:47 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 14 Dec 2022 14:48:04 +0000 (09:48 -0500)
commit9c3db58bf8f7d0007049f686ce8c419eed4325d1
tree70cfc6e4860a9349e4e53d075d549997329f638c
parent47ea20762bb7875a62e10433a3cd5d34e9133f47
drm/amdgpu: fixx NULL pointer deref in gmc_v9_0_get_vm_pte

We not only need to make sure that we have a BO, but also that the BO
has some backing store.

Fixes: d1a372af1c3d ("drm/amdgpu: Set MTYPE in PTE based on BO flags")
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c