]> www.infradead.org Git - users/jedix/linux-maple.git/commit
amdgpu: don't dereference a NULL resource in sysfs code
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 3 Jun 2024 08:46:10 +0000 (10:46 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jun 2024 21:09:46 +0000 (17:09 -0400)
commitc71c9aafd5faa579e6ffe32018071c7af97d5a2e
tree9e1acf150eab293664811f85d626f538986a12c9
parente779af8e8b51b4b3d403fa002e579b56b1931296
amdgpu: don't dereference a NULL resource in sysfs code

dma_resv_trylock being successful doesn't guarantee that bo->tbo.base.resv
is not NULL, so check its validity before using it.

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c