]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: fix a dereference of pdd before it is null checked
authorColin Ian King <colin.king@canonical.com>
Thu, 28 May 2020 22:24:53 +0000 (23:24 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 29 May 2020 17:54:38 +0000 (13:54 -0400)
commitd75daf83f2457e27de45c33c3c0a41b37db7166c
tree2168fff90b4a10c05c63f9ba8777918d6f5a7449
parentdd1f324778b618c2e1f93e65e96fbbffe067011d
drm/amdkfd: fix a dereference of pdd before it is null checked

Currently pointer pdd is being dereferenced when assigning pointer
dpm and then pdd is being null checked.  Fix this by checking if
pdd is null before the dereference of pdd occurs.

Addresses-Coverity: ("Dereference before null check")
Fixes: f8771dd2c732 ("drm/amdkfd: Track SDMA utilization per process")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_process.c