Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: release context ID when context creation fails
@ 2026-10-02 19:47 Sang-Hoon Choi
  2026-10-02 21:04 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Sang-Hoon Choi @ 2026-10-02 19:47 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin
  Cc: intel-gfx, Faith Ekstrand, Changyul Lee

On graphics version 13 and later, xa_alloc() reserves a context ID before
i915_gem_create_context() is called. If context creation fails, the
reserved entry is left in context_xa, making the ID unavailable to later
context allocations on the same DRM file.

Release the unused XArray reservation on the failure path.

Fixes: ca06f9363836 ("drm/i915: Finalize contexts in GEM_CONTEXT_CREATE on version 13+")
Reported-by: Changyul Lee <lcy8047@gmail.com>
Assisted-by: LLM
Signed-off-by: Sang-Hoon Choi <csh0052@gmail.com>
---
Compile-tested the affected object with x86_64 allmodconfig
and W=1 (GCC 13.3.0). Base: mainline 3b7cab693ba2bab63774bf5b988e8a61b2ef0f32.
No hardware testing or runtime failure reproduction was performed.

 drivers/gpu/drm/i915/gem/i915_gem_context.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
index c58ffa5a8fa6..4eb715c2da1c 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
@@ -2421,6 +2421,7 @@ int i915_gem_context_create_ioctl(struct drm_device *dev, void *data,
 		ctx = i915_gem_create_context(i915, ext_data.pc);
 		if (IS_ERR(ctx)) {
 			ret = PTR_ERR(ctx);
+			xa_release(&ext_data.fpriv->context_xa, id);
 			goto err_pc;
 		}
 

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

* ✗ LGCI.VerificationFailed: failure for drm/i915: release context ID when context creation fails
  2026-10-02 19:47 [PATCH] drm/i915: release context ID when context creation fails Sang-Hoon Choi
@ 2026-10-02 21:04 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2026-10-02 21:04 UTC (permalink / raw)
  To: Sang-Hoon Choi; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: release context ID when context creation fails
URL   : https://patchwork.freedesktop.org/series/175461/
State : failure

== Summary ==

Series author address 'csh0052@gmail.com' is not on the allowlist, which prevents CI from being automatically triggered.
If you want CI to run for this series, ask Patchwork project owners to click 'retest' on the series in Patchwork.
Exception occurred during validation, bailing out!
Build URL: http://gfx-ci.igk.intel.com:8080/job/CI_PW_kernel/188954/ (on built-in)



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

end of thread, other threads:[~2026-10-02 21:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-02 19:47 [PATCH] drm/i915: release context ID when context creation fails Sang-Hoon Choi
2026-10-02 21:04 ` ✗ LGCI.VerificationFailed: failure for " Patchwork

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