dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Monk.Liu@amd.com
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [bug report] drm/amdgpu: impl late_fini for amdgpu_pp_ip
Date: Thu, 26 Jan 2017 09:38:04 +0300	[thread overview]
Message-ID: <20170126063804.GI4201@mwanda> (raw)
In-Reply-To: <20161130191921.GB28180@mwanda>

What can we do to fix this one?

regards,
dan carpenter

On Wed, Nov 30, 2016 at 10:19:21PM +0300, Dan Carpenter wrote:
> Hello Monk Liu,
> 
> The patch 482587e3145e: "drm/amdgpu: impl late_fini for amdgpu_pp_ip"
> from May 19, 2016, leads to the following static checker warning:
> 
> 	drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c:218 amdgpu_pp_late_fini()
> 	warn: passing freed memory 'adev->powerplay.pp_handle'
> 
> drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
>    208  static void amdgpu_pp_late_fini(void *handle)
>    209  {
>    210          struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>    211  
>    212          if (adev->pp_enabled) {
>    213                  amdgpu_pm_sysfs_fini(adev);
>    214                  amd_powerplay_fini(adev->powerplay.pp_handle);
>                                            ^^^^^^^^^^^^^^^^^^^^^^^^^
> This gets freed here.
> 
>    215          }
>    216  
>    217          if (adev->powerplay.ip_funcs->late_fini)
>    218                  adev->powerplay.ip_funcs->late_fini(
>    219                            adev->powerplay.pp_handle);
> 
> But we use it again here.
> 
>    220  }
> 
> regards,
> dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2017-01-26  6:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-30 19:19 [bug report] drm/amdgpu: impl late_fini for amdgpu_pp_ip Dan Carpenter
2017-01-26  6:38 ` Dan Carpenter [this message]

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=20170126063804.GI4201@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=Monk.Liu@amd.com \
    --cc=dri-devel@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).