mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Paul <seanpaul@chromium.org>
To: Jeffy Chen <jeffy.chen@rock-chips.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] drm/rockchip: Fix memory leak in rockchip_drm_sys_resume()
Date: Wed, 27 Sep 2017 16:27:09 -0400	[thread overview]
Message-ID: <20170927202709.ugbjyi3ktfjssiyp@art_vandelay> (raw)
In-Reply-To: <20170927122642.18628-1-jeffy.chen@rock-chips.com>

On Wed, Sep 27, 2017 at 08:26:42PM +0800, Jeffy Chen wrote:
> Free the drm_atomic_state allocated by drm_atomic_helper_suspend().
> 
> Fixes: 5a5873830972 ("drm/rockchip: Use atomic PM helpers")
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
> 
>  drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> index 76d63de5921d..80235b672deb 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> @@ -15,6 +15,7 @@
>   */
>  
>  #include <drm/drmP.h>
> +#include <drm/drm_atomic.h>
>  #include <drm/drm_crtc_helper.h>
>  #include <drm/drm_fb_helper.h>
>  #include <drm/drm_gem_cma_helper.h>
> @@ -299,6 +300,7 @@ static int rockchip_drm_sys_resume(struct device *dev)
>  
>  	priv = drm->dev_private;
>  	drm_atomic_helper_resume(drm, priv->state);
> +	drm_atomic_state_put(priv->state);

Won't this be freed for you eventually in commit_tail()?

Sean

>  	rockchip_drm_fb_resume(drm);
>  	drm_kms_helper_poll_enable(drm);
>  
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Sean Paul, Software Engineer, Google / Chromium OS

  reply	other threads:[~2017-09-27 20:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27 12:26 Jeffy Chen
2017-09-27 20:27 ` Sean Paul [this message]
2017-09-28  3:16   ` jeffy
2017-10-09  6:49     ` jeffy

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=20170927202709.ugbjyi3ktfjssiyp@art_vandelay \
    --to=seanpaul@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jeffy.chen@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.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

all inboxes | Powered by JetHome®