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]
Date:   Tue, 26 Nov 2019 11:50:44 -0600
From:   Navid Emamdoost <navid.emamdoost@...il.com>
To:     David Airlie <airlied@...ux.ie>, Daniel Vetter <daniel@...ll.ch>,
        dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
        Ben Skeggs <bskeggs@...hat.com>
Cc:     Navid Emamdoost <emamd001@....edu>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/nouveau: Fix memory leak in nouveau_bo_alloc

ping...

On Thu, Nov 21, 2019 at 12:09 PM Navid Emamdoost
<navid.emamdoost@...il.com> wrote:
>
> On Mon, Oct 21, 2019 at 4:14 PM Navid Emamdoost
> <navid.emamdoost@...il.com> wrote:
> >
> > In the implementation of nouveau_bo_alloc() if it fails to determine the
> > target page size via pi, then the allocated memory for nvbo should be
> > released.
> >
> > Fixes: 019cbd4a4feb ("drm/nouveau: Initialize GEM object before TTM object")
> > Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>
>
> Would you please review this patch?
>
>
> Thanks,
> Navid.
>
> > ---
> >  drivers/gpu/drm/nouveau/nouveau_bo.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
> > index f8015e0318d7..18857cf44068 100644
> > --- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> > +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> > @@ -276,8 +276,10 @@ nouveau_bo_alloc(struct nouveau_cli *cli, u64 *size, int *align, u32 flags,
> >                         break;
> >         }
> >
> > -       if (WARN_ON(pi < 0))
> > +       if (WARN_ON(pi < 0)) {
> > +               kfree(nvbo);
> >                 return ERR_PTR(-EINVAL);
> > +       }
> >
> >         /* Disable compression if suitable settings couldn't be found. */
> >         if (nvbo->comp && !vmm->page[pi].comp) {
> > --
> > 2.17.1
> >
>
>
> --
> Navid.



-- 
Navid.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ