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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEkB2ETfnejEiOeOWU1LdSW+SoovdqXOeJX+C=HK9=jMZDP0Ag@mail.gmail.com>
Date:   Tue, 10 Dec 2019 20:33:50 -0600
From:   Navid Emamdoost <navid.emamdoost@...il.com>
To:     VMware Graphics <linux-graphics-maintainer@...are.com>,
        Thomas Hellstrom <thellstrom@...are.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        dri-devel@...ts.freedesktop.org
Cc:     Navid Emamdoost <emamd001@....edu>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/vmwgfx: prevent memory leak in vmw_cmdbuf_res_add

ping ...

On Thu, Nov 21, 2019 at 12:17 PM Navid Emamdoost
<navid.emamdoost@...il.com> wrote:
>
> On Tue, Sep 24, 2019 at 11:38 PM Navid Emamdoost
> <navid.emamdoost@...il.com> wrote:
> >
> > In vmw_cmdbuf_res_add if drm_ht_insert_item fails the allocated memory
> > for cres should be released.
> >
> > Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>
>
> Would you please review this patch?
>
> Thanks,
>
> > ---
> >  drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
> > index 4ac55fc2bf97..44d858ce4ce7 100644
> > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
> > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
> > @@ -209,8 +209,10 @@ int vmw_cmdbuf_res_add(struct vmw_cmdbuf_res_manager *man,
> >
> >         cres->hash.key = user_key | (res_type << 24);
> >         ret = drm_ht_insert_item(&man->resources, &cres->hash);
> > -       if (unlikely(ret != 0))
> > +       if (unlikely(ret != 0)) {
> > +               kfree(cres);
> >                 goto out_invalid_key;
> > +       }
> >
> >         cres->state = VMW_CMDBUF_RES_ADD;
> >         cres->res = vmw_resource_reference(res);
> > --
> > 2.17.1
> >
>
>
> --
> Navid.



-- 
Navid.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ