Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751882AbdI0U1M (ORCPT ); Wed, 27 Sep 2017 16:27:12 -0400 Received: from mail-yw0-f181.google.com ([209.85.161.181]:49785 "EHLO mail-yw0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751484AbdI0U1K (ORCPT ); Wed, 27 Sep 2017 16:27:10 -0400 X-Google-Smtp-Source: AOwi7QBIM7I9m/+6ZY8DsSMdgplFkRkt5pX9hoOVDgNVqwThsB8lJv1CMYeUwinoumZWDrVF44yQKw== Date: Wed, 27 Sep 2017 16:27:09 -0400 From: Sean Paul To: Jeffy Chen 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() Message-ID: <20170927202709.ugbjyi3ktfjssiyp@art_vandelay> References: <20170927122642.18628-1-jeffy.chen@rock-chips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170927122642.18628-1-jeffy.chen@rock-chips.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1380 Lines: 46 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 > --- > > 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 > +#include > #include > #include > #include > @@ -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