Patch "drm/nouveau/debugfs: fix file release memory leak" has been added to the 4.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/nouveau/debugfs: fix file release memory leak

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-nouveau-debugfs-fix-file-release-memory-leak.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 63062c383b48d578411730129ef212dd0b9d0254
Author: Yang Yingliang <yangyingliang@xxxxxxxxxx>
Date:   Sat Sep 11 15:50:23 2021 +0800

    drm/nouveau/debugfs: fix file release memory leak
    
    [ 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@xxxxxxxxxx>
    Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
    Reviewed-by: Karol Herbst <kherbst@xxxxxxxxxx>
    Signed-off-by: Karol Herbst <kherbst@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210911075023.3969054-2-yangyingliang@xxxxxxxxxx
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
index 411c12cdb249..bb516eb12421 100644
--- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
+++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
@@ -178,6 +178,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[] = {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux