drm/amdgpu: Fix possible null pointer dereference
authorFelix Kuehling <Felix.Kuehling@amd.com>
Tue, 31 Oct 2023 17:30:00 +0000 (13:30 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:20:17 +0000 (17:20 +0000)
commit5e4d9fda7e65cd267900f7d2c7c1579a98bf413c
tree1cb89f34bc102402608988664a8cb4bf9ccfbe8a
parentc0707623d46021262e68e6aa9e2111ba84593412
drm/amdgpu: Fix possible null pointer dereference

commit 256503071c2de2b5b5c20e06654aa9a44f13aa62 upstream.

mem = bo->tbo.resource may be NULL in amdgpu_vm_bo_update.

Fixes: 180253782038 ("drm/ttm: stop allocating dummy resources during BO creation")
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c