[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_N_s9qyERmh7BgJhPjvfFb8aZvzbBjBuw9JttQFr85DTA@mail.gmail.com>
Date: Wed, 2 Oct 2019 09:52:49 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Navid Emamdoost <navid.emamdoost@...il.com>
Cc: Harry Wentland <harry.wentland@....com>,
Christian König <christian.koenig@....com>,
Nikola Cornij <nikola.cornij@....com>,
David Airlie <airlied@...ux.ie>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
LKML <linux-kernel@...r.kernel.org>, Jun Lei <Jun.Lei@....com>,
"David (ChunMing) Zhou" <David1.Zhou@....com>,
Bhawanpreet Lakha <Bhawanpreet.Lakha@....com>,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
Navid Emamdoost <emamd001@....edu>,
Eric Bernstein <Eric.Bernstein@....com>,
Stephen McCamant <smccaman@....edu>,
Charlene Liu <Charlene.Liu@....com>,
Leo Li <sunpeng.li@....com>, Kangjie Lu <kjlu@....edu>,
hersen wu <hersenxs.wu@....com>,
Tony Cheng <Tony.Cheng@....com>,
Ken Chalmers <ken.chalmers@....com>,
Thomas Lim <Thomas.Lim@....com>,
Eric Yang <Eric.Yang2@....com>,
Wesley Chalmers <Wesley.Chalmers@....com>,
Roman Li <Roman.Li@....com>,
Dmytro Laktyushkin <Dmytro.Laktyushkin@....com>,
Daniel Vetter <daniel@...ll.ch>,
Alex Deucher <alexander.deucher@....com>,
Nicholas Kazlauskas <nicholas.kazlauskas@....com>
Subject: Re: [PATCH] drm/amd/display: memory leak
On Tue, Oct 1, 2019 at 5:00 PM Navid Emamdoost
<navid.emamdoost@...il.com> wrote:
>
> Would you please review this patch?
>
Applied. thanks!
Alex
>
> Thanks,
> Navid.
>
> On Mon, Sep 16, 2019 at 10:21 PM Navid Emamdoost
> <navid.emamdoost@...il.com> wrote:
> >
> > In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated
> > clk_src needs release.
> >
> > Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>
> > ---
> > drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 3 ++-
> > drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 1 +
> > drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 1 +
> > drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 1 +
> > drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 1 +
> > drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 +
> > drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 1 +
> > 7 files changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
> > index 6248c8455314..21de230b303a 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
> > @@ -667,7 +667,8 @@ struct clock_source *dce100_clock_source_create(
> > clk_src->base.dp_clk_src = dp_clk_src;
> > return &clk_src->base;
> > }
> > -
> > +
> > + kfree(clk_src);
> > BREAK_TO_DEBUGGER();
> > return NULL;
> > }
> > diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
> > index 764329264c3b..0cb83b0e0e1e 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
> > @@ -714,6 +714,7 @@ struct clock_source *dce110_clock_source_create(
> > return &clk_src->base;
> > }
> >
> > + kfree(clk_src);
> > BREAK_TO_DEBUGGER();
> > return NULL;
> > }
> > diff --git a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
> > index c6136e0ed1a4..147d77173e2b 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
> > @@ -687,6 +687,7 @@ struct clock_source *dce112_clock_source_create(
> > return &clk_src->base;
> > }
> >
> > + kfree(clk_src);
> > BREAK_TO_DEBUGGER();
> > return NULL;
> > }
> > diff --git a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c
> > index 4a6ba3173a5a..0b5eeff17d00 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c
> > @@ -500,6 +500,7 @@ static struct clock_source *dce120_clock_source_create(
> > return &clk_src->base;
> > }
> >
> > + kfree(clk_src);
> > BREAK_TO_DEBUGGER();
> > return NULL;
> > }
> > diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
> > index 860a524ebcfa..952440893fbb 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
> > @@ -701,6 +701,7 @@ struct clock_source *dce80_clock_source_create(
> > return &clk_src->base;
> > }
> >
> > + kfree(clk_src);
> > BREAK_TO_DEBUGGER();
> > return NULL;
> > }
> > diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
> > index a12530a3ab9c..3f25e8da5396 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
> > @@ -786,6 +786,7 @@ struct clock_source *dcn10_clock_source_create(
> > return &clk_src->base;
> > }
> >
> > + kfree(clk_src);
> > BREAK_TO_DEBUGGER();
> > return NULL;
> > }
> > diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> > index b949e202d6cb..418fdcf1f492 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> > @@ -955,6 +955,7 @@ struct clock_source *dcn20_clock_source_create(
> > return &clk_src->base;
> > }
> >
> > + kfree(clk_src)
> > BREAK_TO_DEBUGGER();
> > return NULL;
> > }
> > --
> > 2.17.1
> >
>
>
> --
> Navid.
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Powered by blists - more mailing lists