mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 14:56:54 -04:00
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: 32cb59f313 ("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>
This commit is contained in:
committed by
Alex Deucher
parent
48b270bb22
commit
2652bda7b4
@@ -103,10 +103,11 @@ static void kfd_sdma_activity_worker(struct work_struct *work)
|
||||
return;
|
||||
|
||||
pdd = workarea->pdd;
|
||||
if (!pdd)
|
||||
return;
|
||||
dqm = pdd->dev->dqm;
|
||||
qpd = &pdd->qpd;
|
||||
|
||||
if (!pdd || !dqm || !qpd)
|
||||
if (!dqm || !qpd)
|
||||
return;
|
||||
|
||||
mm = get_task_mm(pdd->process->lead_thread);
|
||||
|
||||
Reference in New Issue
Block a user