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-next>] [day] [month] [year] [list]
Message-ID: <CADnq5_MMTBXt50sqJvYmXWn0uBALz2fNvpSrCfjSuMa99VLa=w@mail.gmail.com>
Date:   Thu, 18 Mar 2021 22:57:53 -0400
From:   Alex Deucher <alexdeucher@...il.com>
To:     "Koenig, Christian" <Christian.Koenig@....com>
Cc:     Daniel Gomez <daniel@...c.com>, David Airlie <airlied@...ux.ie>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
        "Deucher, Alexander" <Alexander.Deucher@....com>,
        "dagmcr@...il.com" <dagmcr@...il.com>
Subject: Re: [PATCH] drm/radeon/ttm: Fix memory leak userptr pages

Applied.  Thanks!

Alex

On Thu, Mar 18, 2021 at 5:00 AM Koenig, Christian
<Christian.Koenig@....com> wrote:
>
> Reviewed-by: Christian König <christian.koenig@....com>
> ________________________________
> Von: Daniel Gomez <daniel@...c.com>
> Gesendet: Donnerstag, 18. März 2021 09:32
> Cc: dagmcr@...il.com <dagmcr@...il.com>; Daniel Gomez <daniel@...c.com>; Deucher, Alexander <Alexander.Deucher@....com>; Koenig, Christian <Christian.Koenig@....com>; David Airlie <airlied@...ux.ie>; Daniel Vetter <daniel@...ll.ch>; amd-gfx@...ts.freedesktop.org <amd-gfx@...ts.freedesktop.org>; dri-devel@...ts.freedesktop.org <dri-devel@...ts.freedesktop.org>; linux-kernel@...r.kernel.org <linux-kernel@...r.kernel.org>
> Betreff: [PATCH] drm/radeon/ttm: Fix memory leak userptr pages
>
> If userptr pages have been pinned but not bounded,
> they remain uncleared.
>
> Signed-off-by: Daniel Gomez <daniel@...c.com>
> ---
>  drivers/gpu/drm/radeon/radeon_ttm.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index e8c66d10478f..bbcc6264d48f 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -485,13 +485,14 @@ static void radeon_ttm_backend_unbind(struct ttm_bo_device *bdev, struct ttm_tt
>          struct radeon_ttm_tt *gtt = (void *)ttm;
>          struct radeon_device *rdev = radeon_get_rdev(bdev);
>
> +       if (gtt->userptr)
> +               radeon_ttm_tt_unpin_userptr(bdev, ttm);
> +
>          if (!gtt->bound)
>                  return;
>
>          radeon_gart_unbind(rdev, gtt->offset, ttm->num_pages);
>
> -       if (gtt->userptr)
> -               radeon_ttm_tt_unpin_userptr(bdev, ttm);
>          gtt->bound = false;
>  }
>
> --
> 2.30.2
>
> _______________________________________________
> 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