Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: avoid using uninitialized context
@ 2025-01-27 11:46 Krzysztof Karas
  2025-01-27 13:22 ` ✗ i915.CI.BAT: failure for " Patchwork
  2025-01-27 15:49 ` [PATCH] " Sebastian Brzezinka
  0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Karas @ 2025-01-27 11:46 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Maarten Lankhorst

There is an error path in igt_ppgtt_alloc(), which leads to ww
object being passed down to i915_gem_ww_ctx_fini() without
initialization. Correct that by zeroing the struct.

Fixes: 480ae79537b2 ("drm/i915/selftests: Prepare gtt tests for obj->mm.lock removal")
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
---
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index 5816d515203a..29b9c75557da 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@ -154,7 +154,7 @@ static int igt_ppgtt_alloc(void *arg)
 {
 	struct drm_i915_private *dev_priv = arg;
 	struct i915_ppgtt *ppgtt;
-	struct i915_gem_ww_ctx ww;
+	struct i915_gem_ww_ctx ww = {};
 	u64 size, last, limit;
 	int err = 0;
 
-- 
2.43.0


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

end of thread, other threads:[~2025-01-28 12:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-27 11:46 [PATCH] drm/i915/selftests: avoid using uninitialized context Krzysztof Karas
2025-01-27 13:22 ` ✗ i915.CI.BAT: failure for " Patchwork
2025-01-27 13:54   ` Krzysztof Karas
2025-01-27 15:49 ` [PATCH] " Sebastian Brzezinka
2025-01-28 12:11   ` Krzysztof Karas

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