drm/nouveau/kms/nv50-: fix file release memory leak
Subsystems (3)
PATCH 1/2 drm/nouveau/kms/nv50-: fix file release memory leak
When using single_open() for opening, single_release() should be called, otherwise the 'op' allocated in single_open() will be leaked.
Fixes 12885ecbfe62 ("drm/nouveau/kms/nvd9-: Add CRC support")
Reported-by Hulk Robot <[email protected]>
Signed-off-by Yang Yingliang <[email protected]>
--- drivers/gpu/drm/nouveau/dispnv50/crc.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/nouveau/dispnv50/crc.c +1 -0
@@ -704,6 +704,7 @@ static const struct file_operations nv50_crc_flip_threshold_fops = { .open = nv50_crc_debugfs_flip_threshold_open, .read = seq_read, .write = nv50_crc_debugfs_flip_threshold_set, + .release = single_release, };int nv50_head_crc_late_register (struct nv50_head *head)
Signature · 1 line
2.25.1
PATCH 2/2 drm/nouveau/debugfs: fix file release memory leak
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 <[email protected]>
Signed-off-by Yang Yingliang <[email protected]>
--- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/nouveau/nouveau_debugfs.c +1 -0
@@ -207,6 +207,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[] = {
Signature · 1 line
2.25.1
Re: [PATCH 2/2] drm/nouveau/debugfs: fix file release memory leak
Reviewed-by Karol Herbst <[email protected]>
Quoted 26 lines · Yang Yingliang
When using
single_open()for opening,single_release()should be called, otherwise the 'op' allocated insingle_open()will be leaked.Fixes 6e9fc177399f ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs")Reported-by Hulk Robot <[email protected]>Signed-off-by Yang Yingliang <[email protected]>--- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/nouveau/nouveau_debugfs.c +1
-1@@ -207,6 +207,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[] = { --2.25.1
Reviewed-by Karol Herbst <[email protected]>
Quoted 26 lines · Yang Yingliang
When using
single_open()for opening,single_release()should be called, otherwise the 'op' allocated insingle_open()will be leaked.Fixes 12885ecbfe62 ("drm/nouveau/kms/nvd9-: Add CRC support")Reported-by Hulk Robot <[email protected]>Signed-off-by Yang Yingliang <[email protected]>--- drivers/gpu/drm/nouveau/dispnv50/crc.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/nouveau/dispnv50/crc.c +1
-1@@ -704,6 +704,7 @@ static const struct file_operations nv50_crc_flip_threshold_fops = { .open = nv50_crc_debugfs_flip_threshold_open, .read = seq_read, .write = nv50_crc_debugfs_flip_threshold_set, + .release = single_release, };int nv50_head_crc_late_register (struct nv50_head *head) --2.25.1