[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACO55tsJt2Z-EQBpPw1=yq_jya2kJ5u5xs_xg=nhB8ZHwhjCoA@mail.gmail.com>
Date: Thu, 5 Sep 2019 11:11:49 +0200
From: Karol Herbst <kherbst@...hat.com>
To: Wei Yongjun <weiyongjun1@...wei.com>
Cc: Ben Skeggs <bskeggs@...hat.com>, David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
nouveau <nouveau@...ts.freedesktop.org>,
kernel-janitors@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
dri-devel <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH] drm/nouveau: add missing single_release()
Reviewed-by: Karol Herbst <kherbst@...hat.com>
On Thu, Sep 5, 2019 at 9:14 AM Wei Yongjun <weiyongjun1@...wei.com> wrote:
>
> When using single_open() for opening, single_release() should be
> used, otherwise there is a memory leak.
>
> This is detected by Coccinelle semantic patch.
>
> Fixes: 6e9fc177399f ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs")
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
> ---
> drivers/gpu/drm/nouveau/nouveau_debugfs.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
> index 7dfbbbc1beea..35695f493271 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
> @@ -202,6 +202,7 @@ static const struct file_operations nouveau_pstate_fops = {
> .open = nouveau_debugfs_pstate_open,
> .read = seq_read,
> .write = nouveau_debugfs_pstate_set,
> + .release = single_release,
> };
>
> static struct drm_info_list nouveau_debugfs_list[] = {
>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Powered by blists - more mailing lists