Skip to contentSkip to conversation

drm/vc4: Fix leak of the file_priv that stored the perfmon.

PATCH In review Eric Anholt 2 participants 3 messages Apr 9, 2018 – Apr 12, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vc4: Fix leak of the file_priv that stored the perfmon.

Fixes 65101d8c9108 ("drm/vc4: Expose performance counters to userspace")
---
 drivers/gpu/drm/vc4/vc4_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/vc4/vc4_drv.c +1 -0
index 94b99c90425a..7c95ed5c5cac 100644
@@ -130,6 +130,7 @@ static void vc4_close(struct drm_device *dev, struct drm_file *file)
 	struct vc4_file *vc4file = file->driver_priv;
 
 	vc4_perfmon_close_file(vc4file);
+	kfree(vc4file);
 }
 
 static const struct vm_operations_struct vc4_vm_ops = {
Signature · 6 lines
2.17.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · On Mon, 9 Apr 2018 13:58:13 -0700 Eric Anholt <[email protected]> wrote:
Fixes 65101d8c9108 ("drm/vc4: Expose performance counters to userspace")
Quoted 9 lines
---
 drivers/gpu/drm/vc4/vc4_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/vc4/vc4_drv.c +0 -0
index 94b99c90425a..7c95ed5c5cac 100644

drivers/gpu/drm/vc4/vc4_drv.c static void vc4_close(struct drm_device *dev, struct drm_file *file) · line 136

Quoted 7 lines
drivers/gpu/drm/vc4/vc4_drv.c +1 -0
@@ -130,6 +130,7 @@ static void vc4_close(struct drm_device *dev, struct drm_file *file)
 	struct vc4_file *vc4file = file->driver_priv;
 
 	vc4_perfmon_close_file(vc4file);
+	kfree(vc4file);
 }
 
 static const struct vm_operations_struct vc4_vm_ops = {

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author Applied
#2 lore raw
Quoted 7 lines · Boris Brezillon
Quoted 2 lines · On Mon, 9 Apr 2018 13:58:13 -0700 Eric Anholt <[email protected]> wrote:
Fixes 65101d8c9108 ("drm/vc4: Expose performance counters to userspace")

Applied to drm-misc-next-fixes. Thanks!

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel