Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
To: Krzysztof Karas <krzysztof.karas@intel.com>,
	<intel-gfx@lists.freedesktop.org>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
	Andi Shyti <andi.shyti@linux.intel.com>,
	Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>,
	Sebastian Brzezinka <sebastian.brzezinka@intel.com>,
	Krzysztof Niemiec <krzysztof.niemiec@intel.com>
Subject: Re: [PATCH v2] drm/i915/gt: Do not destroy uninitialized timer
Date: Thu, 1 Oct 2026 14:06:21 +0200	[thread overview]
Message-ID: <DLTHLS3RB2RB.1UHVXLAFM1CEI@intel.com> (raw)
In-Reply-To: <20261001071757.2688815-1-krzysztof.karas@intel.com>

On Thu Oct 1, 2026 at 9:17 AM CEST, Krzysztof Karas wrote:
> If intel_ring_begin() fails in live_emit_pte_full_ring(), then
> cleanup is performed on an uninitialized timer.
>
> Prevent that by jumping to a dedicated label for driver removal
> cleanup.
>
> Assisted-by: Copilot-Claude-Opus-5
> Suggested-by: Jani Nikula <jani.nikula@linux.intel.com>
> Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/selftest_migrate.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/selftest_migrate.c b/drivers/gpu/drm/i915/gt/selftest_migrate.c
> index 5b986a7687d9..5e3a9b5a83eb 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_migrate.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_migrate.c
> @@ -651,17 +651,18 @@ static int live_emit_pte_full_ring(void *arg)
>  	len = emit_pte(rq, &it, obj->pat_index, false, 0, CHUNK_SZ);
>  	if (!len) {
>  		err = -EINVAL;
> -		goto out_rq;
> +		goto out_timer;
>  	}
>  	if (len < 0) {
>  		err = len;
> -		goto out_rq;
> +		goto out_timer;
>  	}
>  
> -out_rq:
> -	i915_request_add(rq); /* GEM_BUG_ON(rq->reserved_space > ring->space)? */
> +out_timer:
>  	timer_delete_sync(&st.timer);
>  	timer_destroy_on_stack(&st.timer);
> +out_rq:
> +	i915_request_add(rq); /* GEM_BUG_ON(rq->reserved_space > ring->space)? */
>  out_unpin:
>  	intel_context_unpin(ce);
>  out_put:
Reviewed-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>

-- 
Best regards,
Sebastian


  parent reply	other threads:[~2026-10-01 12:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01  7:17 [PATCH v2] drm/i915/gt: Do not destroy uninitialized timer Krzysztof Karas
2026-10-01  8:08 ` Jani Nikula
2026-10-01 10:07 ` ✓ i915.CI.BAT: success for drm/i915/gt: Do not destroy uninitialized timer (rev2) Patchwork
2026-10-01 12:06 ` Sebastian Brzezinka [this message]
2026-10-02 11:55 ` ✓ i915.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DLTHLS3RB2RB.1UHVXLAFM1CEI@intel.com \
    --to=sebastian.brzezinka@intel.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=janusz.krzysztofik@linux.intel.com \
    --cc=krzysztof.karas@intel.com \
    --cc=krzysztof.niemiec@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox