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: <CAFCwf12WFRf-UorVkfKSwLthsW-_=Gc7vcvisVC6Wh017o+2Eg@mail.gmail.com>
Date:   Mon, 5 Aug 2019 10:17:02 +0300
From:   Oded Gabbay <oded.gabbay@...il.com>
To:     Tomer Tayar <ttayar@...ana.ai>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] habanalabs: Update DRAM consumption on context tear down

On Sun, Aug 4, 2019 at 10:03 AM Tomer Tayar <ttayar@...ana.ai> wrote:
>
> The patch adds a missing update of the DRAM memory consumption, when a
> context is being torn down without an organized release of the allocated
> memory.
>
> Signed-off-by: Tomer Tayar <ttayar@...ana.ai>
> ---
>  drivers/misc/habanalabs/memory.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/misc/habanalabs/memory.c b/drivers/misc/habanalabs/memory.c
> index 42d237cae1dc..365fb0cb8dff 100644
> --- a/drivers/misc/habanalabs/memory.c
> +++ b/drivers/misc/habanalabs/memory.c
> @@ -1629,6 +1629,8 @@ void hl_vm_ctx_fini(struct hl_ctx *ctx)
>                         dev_dbg(hdev->dev,
>                                 "page list 0x%p of asid %d is still alive\n",
>                                 phys_pg_list, ctx->asid);
> +                       atomic64_sub(phys_pg_list->total_size,
> +                                       &hdev->dram_used_mem);
>                         free_phys_pg_pack(hdev, phys_pg_list);
>                         idr_remove(&vm->phys_pg_pack_handles, i);
>                 }
> --
> 2.17.1
>

This patch is:
Reviewed-by: Oded Gabbay <oded.gabbay@...il.com>
Applied to -fixed.
Thanks.
Oded

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ