All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/amdkfd: Track SDMA utilization per process
@ 2020-05-29  8:47 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2020-05-29  8:47 UTC (permalink / raw)
  To: mukul.joshi; +Cc: amd-gfx

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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-29  8:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-29  8:47 [bug report] drm/amdkfd: Track SDMA utilization per process Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.