From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: alexander.deucher-5C7GfCeVMHo@public.gmane.org
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [bug report] drm/amdgpu: rework IP block registration (v2)
Date: Tue, 16 Jan 2018 14:02:27 +0300 [thread overview]
Message-ID: <20180116110227.GA5445@mwanda> (raw)
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
reply other threads:[~2018-01-16 11:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180116110227.GA5445@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.