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: <CAL9mu0JOWU7+ORdGMSU1BhMa1DqEN75yRqDycKR04FwTNEzMig@mail.gmail.com>
Date:   Tue, 25 May 2021 13:26:37 +0800
From:   Dillon Min <dillon.minfei@...il.com>
To:     mchehab+huawei@...nel.org, hverkuil-cisco@...all.nl,
        a.hajda@...sung.com
Cc:     Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        linux-media <linux-media@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>
Subject: Re: [PATCH] media: s5p-g2d: Fix a memory leak on ctx->fh.m2m_ctx

Just a kind ping.

Thanks.
Dillon,

On Tue, May 11, 2021 at 12:09 PM <dillon.minfei@...il.com> wrote:
>
> From: Dillon Min <dillon.minfei@...il.com>
>
> The m2m_ctx resources was allocated by v4l2_m2m_ctx_init() in g2d_open()
> should be freed from g2d_release() when it's not used.
>
> Fix it
>
> Fixes: 918847341af0 ("[media] v4l: add G2D driver for s5p device family")
> Signed-off-by: Dillon Min <dillon.minfei@...il.com>
> ---
>  drivers/media/platform/s5p-g2d/g2d.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
> index 15bcb7f6e113..0818fdd3e984 100644
> --- a/drivers/media/platform/s5p-g2d/g2d.c
> +++ b/drivers/media/platform/s5p-g2d/g2d.c
> @@ -279,6 +279,9 @@ static int g2d_release(struct file *file)
>         v4l2_ctrl_handler_free(&ctx->ctrl_handler);
>         v4l2_fh_del(&ctx->fh);
>         v4l2_fh_exit(&ctx->fh);
> +       mutex_lock(&dev->mutex);
> +       v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
> +       mutex_unlock(&dev->mutex);
>         kfree(ctx);
>         v4l2_info(&dev->v4l2_dev, "instance closed\n");
>         return 0;
> --
> 2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ