All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/amdgpu: rework IP block registration (v2)
@ 2018-01-16 11:02 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2018-01-16 11:02 UTC (permalink / raw)
  To: alexander.deucher-5C7GfCeVMHo; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Hello Alex Deucher,

The patch a12551072126: "drm/amdgpu: rework IP block registration
(v2)" from Oct 13, 2016, leads to the following static checker
warning:

	drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1504 amdgpu_device_ip_fini()
	error: dereferencing freed memory 'adev'

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
  1495                  adev->ip_blocks[i].status.sw = false;
  1496                  adev->ip_blocks[i].status.valid = false;
  1497          }
  1498  
  1499          for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
  1500                  if (!adev->ip_blocks[i].status.late_initialized)
  1501                          continue;
  1502                  if (adev->ip_blocks[i].version->funcs->late_fini)
  1503                          adev->ip_blocks[i].version->funcs->late_fini((void *)adev);

The warning is because pp_late_fini() frees the parameter.  The
amdgpu_pp_late_fini() function doesn't so that's a bit weird.

  1504                  adev->ip_blocks[i].status.late_initialized = false;
                        ^^^^^^^^^^^^^^^
Dereference.

  1505          }
  1506  

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:[~2018-01-16 11:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-16 11:02 [bug report] drm/amdgpu: rework IP block registration (v2) 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.