lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_MuFQgTQn50DikASgNVjLaJxPcQdfMPXesxdSqhME_Dmg@mail.gmail.com>
Date:   Wed, 25 Sep 2019 12:04:22 -0400
From:   Alex Deucher <alexdeucher@...il.com>
To:     Harry Wentland <hwentlan@....com>
Cc:     Navid Emamdoost <navid.emamdoost@...il.com>,
        David Airlie <airlied@...ux.ie>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Lei, Jun" <Jun.Lei@....com>, Sam Ravnborg <sam@...nborg.org>,
        Wang Hai <wanghai26@...wei.com>,
        "Cheng, Tony" <Tony.Cheng@....com>,
        "Francis, David" <David.Francis@....com>,
        "amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
        "emamd001@....edu" <emamd001@....edu>,
        "Bernstein, Eric" <Eric.Bernstein@....com>,
        Su Sung Chung <Su.Chung@....com>,
        "smccaman@....edu" <smccaman@....edu>,
        "Li, Sun peng (Leo)" <Sunpeng.Li@....com>,
        "kjlu@....edu" <kjlu@....edu>, Aidan Wood <Aidan.Wood@....com>,
        "Wu, Hersen" <hersenxs.wu@....com>,
        "Lakha, Bhawanpreet" <Bhawanpreet.Lakha@....com>,
        "Chalmers, Kenneth" <Ken.Chalmers@....com>,
        Thomas Lim <Thomas.Lim@....com>,
        "Yang, Eric" <Eric.Yang2@....com>,
        "Chalmers, Wesley" <Wesley.Chalmers@....com>,
        "Li, Roman" <Roman.Li@....com>,
        "Koenig, Christian" <Christian.Koenig@....com>,
        "Laktyushkin, Dmytro" <Dmytro.Laktyushkin@....com>,
        "Deucher, Alexander" <Alexander.Deucher@....com>,
        "Kazlauskas, Nicholas" <Nicholas.Kazlauskas@....com>
Subject: Re: [PATCH] drm/amd/display: prevent memory leak

On Wed, Sep 25, 2019 at 9:54 AM Harry Wentland <hwentlan@....com> wrote:
>
>
>
> On 2019-09-25 12:23 a.m., Navid Emamdoost wrote:
> > In dcn*_create_resource_pool the allocated memory should be released if
> > construct pool fails.
> >
> > Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>
>
> Reviewed-by: Harry Wentland <harry.wentland@....com>
>

Applied.  thanks!

Alex

> Harry
>
> > ---
> >  drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 1 +
> >  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/dcn10/dcn10_resource.c   | 1 +
> >  5 files changed, 5 insertions(+)
> >
> > 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 afc61055eca1..1787b9bf800a 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
> > @@ -1091,6 +1091,7 @@ struct resource_pool *dce100_create_resource_pool(
> >       if (construct(num_virtual_links, dc, pool))
> >               return &pool->base;
> >
> > +     kfree(pool);
> >       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 c66fe170e1e8..318e9c2e2ca8 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
> > @@ -1462,6 +1462,7 @@ struct resource_pool *dce110_create_resource_pool(
> >       if (construct(num_virtual_links, dc, pool, asic_id))
> >               return &pool->base;
> >
> > +     kfree(pool);
> >       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 3ac4c7e73050..3199d493d13b 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
> > @@ -1338,6 +1338,7 @@ struct resource_pool *dce112_create_resource_pool(
> >       if (construct(num_virtual_links, dc, pool))
> >               return &pool->base;
> >
> > +     kfree(pool);
> >       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 7d08154e9662..bb497f43f6eb 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c
> > @@ -1203,6 +1203,7 @@ struct resource_pool *dce120_create_resource_pool(
> >       if (construct(num_virtual_links, dc, pool))
> >               return &pool->base;
> >
> > +     kfree(pool);
> >       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 5a89e462e7cc..59305e411a66 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
> > @@ -1570,6 +1570,7 @@ struct resource_pool *dcn10_create_resource_pool(
> >       if (construct(init_data->num_virtual_links, dc, pool))
> >               return &pool->base;
> >
> > +     kfree(pool);
> >       BREAK_TO_DEBUGGER();
> >       return NULL;
> >  }
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ