[PATCH] fix: drm/i915: __live_active_setup: kfree bypasses kref_put in early error path
From: WenTao Liang
Date: Fri Jun 26 2026 - 09:25:54 EST
When heap_fence_create fails, the early error path calls kfree(active)
directly instead of __live_put(active), bypassing the kref_put path that
would call i915_active_fini for proper resource teardown. This skips
cleanup of the i915_active state while the initial kref from kref_init
remains unbalanced.
Cc: stable@xxxxxxxxxxxxxxx
Fixes: 5361db1a33c7 ("drm/i915: Track i915_active using debugobjects")
Signed-off-by: WenTao Liang <vulab@xxxxxxxxxxx>
---
drivers/gpu/drm/i915/selftests/i915_active.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_active.c b/drivers/gpu/drm/i915/selftests/i915_active.c
index 9fea2fabeac4..8ec7859da762 100644
--- a/drivers/gpu/drm/i915/selftests/i915_active.c
+++ b/drivers/gpu/drm/i915/selftests/i915_active.c
@@ -91,7 +91,7 @@ __live_active_setup(struct drm_i915_private *i915)
submit = heap_fence_create(GFP_KERNEL);
if (!submit) {
- kfree(active);
+ __live_put(active);
return ERR_PTR(-ENOMEM);
}
--
2.39.5 (Apple Git-154)