public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915: Don't leak the capture list items
@ 2021-12-09 14:13 Thomas Hellström
  2021-12-09 17:28 ` Matthew Auld
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Thomas Hellström @ 2021-12-09 14:13 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Thomas Hellström, matthew.auld

When we recently converted the capture code to use vma snapshots,
we forgot to free the struct i915_capture_list list items after use.

Fix that by bringing back a kfree.

Fixes: ff20afc4cee7 ("drm/i915: Update error capture code to avoid using the current vma state")
Cc: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_request.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index 471cde0e9883..fe682b6902aa 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -307,6 +307,7 @@ void i915_request_free_capture_list(struct i915_capture_list *capture)
 		struct i915_capture_list *next = capture->next;
 
 		i915_vma_snapshot_put(capture->vma_snapshot);
+		kfree(capture);
 		capture = next;
 	}
 }
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-12-13 17:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-09 14:13 [Intel-gfx] [PATCH] drm/i915: Don't leak the capture list items Thomas Hellström
2021-12-09 17:28 ` Matthew Auld
2021-12-10  1:41 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2021-12-10 15:01 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Don't leak the capture list items (rev2) Patchwork
2021-12-11  9:49 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-12-13  9:50   ` Thomas Hellström
2021-12-13 17:22     ` Vudum, Lakshminarayana
2021-12-13 17:10 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox