]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
drm/nouveau/debugfs: fix file release memory leak
authorYang Yingliang <yangyingliang@huawei.com>
Sat, 11 Sep 2021 07:50:23 +0000 (15:50 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 12 Nov 2021 13:07:30 +0000 (14:07 +0100)
commit13db6746256eaece36e55ea1bc8cbbdaf78522e1
tree718f8cb88ef7375c929d372447b4d21ead502b9d
parenta1f45125aed7cc01e7767fb2d4a92c84b219bf8a
drm/nouveau/debugfs: fix file release memory leak

BugLink: https://bugs.launchpad.net/bugs/1950014
[ Upstream commit f5a8703a9c418c6fc54eb772712dfe7641e3991c ]

When using single_open() for opening, single_release() should be
called, otherwise the 'op' allocated in single_open() will be leaked.

Fixes: 6e9fc177399f ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210911075023.3969054-2-yangyingliang@huawei.com
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/nouveau/nouveau_debugfs.c