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] [day] [month] [year] [list]
Message-ID: <CAF6AEGsRMB_XvAKuaV8uf3yT61j-845GLB7sKPQoJrOQwd5-QQ@mail.gmail.com>
Date:   Mon, 21 Sep 2020 08:47:48 -0700
From:   Rob Clark <robdclark@...il.com>
To:     Akhil P Oommen <akhilpo@...eaurora.org>
Cc:     freedreno <freedreno@...ts.freedesktop.org>,
        dri-devel@...edesktop.org,
        linux-arm-msm <linux-arm-msm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Jordan Crouse <jcrouse@...eaurora.org>,
        Matthias Kaehlcke <mka@...omium.org>,
        Jonathan <jonathan@...ek.ca>,
        Douglas Anderson <dianders@...omium.org>
Subject: Re: [PATCH 2/2] drm/msm: Leave inuse count intact on map failure

On Mon, Sep 21, 2020 at 8:27 AM Akhil P Oommen <akhilpo@...eaurora.org> wrote:
>
> Leave the inuse count intact on map failure to keep the accounting
> accurate.
>
> Signed-off-by: Akhil P Oommen <akhilpo@...eaurora.org>
> ---
>  drivers/gpu/drm/msm/msm_gem_vma.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_gem_vma.c b/drivers/gpu/drm/msm/msm_gem_vma.c
> index 80a8a26..8367a1c 100644
> --- a/drivers/gpu/drm/msm/msm_gem_vma.c
> +++ b/drivers/gpu/drm/msm/msm_gem_vma.c
> @@ -88,8 +88,10 @@ msm_gem_map_vma(struct msm_gem_address_space *aspace,
>                 ret = aspace->mmu->funcs->map(aspace->mmu, vma->iova, sgt,
>                                 size, prot);
>
> -       if (ret)
> +       if (ret) {
>                 vma->mapped = false;
> +               vma->inuse++;

vma->inuse-- ?

BR,
-R

> +       }
>
>         return ret;
>  }
> --
> 2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ