[bug report] drm/amdkfd: Track SDMA utilization per process
Dan Carpenter
dan.carpenter at oracle.com
Fri May 29 08:47:30 UTC 2020
Hello Mukul Joshi,
This is a semi-automatic email about new static checker warnings.
The patch 522b89c63370: "drm/amdkfd: Track SDMA utilization per
process" from May 26, 2020, leads to the following Smatch complaint:
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:109 kfd_sdma_activity_worker()
warn: variable dereferenced before check 'pdd' (see line 106)
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:109 kfd_sdma_activity_worker()
warn: address of 'pdd->qpd' is non-NULL
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c
105 pdd = workarea->pdd;
106 dqm = pdd->dev->dqm;
^^^^^^^^
Dereference.
107 qpd = &pdd->qpd;
108
109 if (!pdd || !dqm || !qpd)
^^^ ^^^
pdd is checked too late and qpd can't possibly be NULL.
110 return;
111
regards,
dan carpenter
More information about the amd-gfx
mailing list