From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Fix uninitialised variable in intel_context_create_request.
Date: Fri, 18 Sep 2020 13:19:40 -0400 [thread overview]
Message-ID: <20200918171940.GC716636@intel.com> (raw)
In-Reply-To: <20200918111208.1392128-1-maarten.lankhorst@linux.intel.com>
On Fri, Sep 18, 2020 at 01:12:08PM +0200, Maarten Lankhorst wrote:
> In case backoff fails with an error, we return an undefined rq,
> assign err to rq correctly.
>
> Fixes: 8a929c9eb1c2 ("drm/i915: Use ww pinning for intel_context_create_request()")
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_context.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_context.c b/drivers/gpu/drm/i915/gt/intel_context.c
> index d301dda1b261..92a3f25c4006 100644
> --- a/drivers/gpu/drm/i915/gt/intel_context.c
> +++ b/drivers/gpu/drm/i915/gt/intel_context.c
> @@ -472,6 +472,7 @@ struct i915_request *intel_context_create_request(struct intel_context *ce)
> err = i915_gem_ww_ctx_backoff(&ww);
> if (!err)
> goto retry;
> + rq = ERR_PTR(err);
The mix with "err" and rq handling both request and err is a bit confusing
ihmo and prone to misses like this.
I wonder if we also need this before the goto retry as well...
but anyway it looks better than before with no rq assigment on this block...
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> } else {
> rq = ERR_PTR(err);
> }
>
> base-commit: 5887fa2d8b9b7f6a278f9a1bc8642cb9d5d0279a
> --
> 2.28.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-09-18 17:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-18 11:12 [Intel-gfx] [PATCH] drm/i915: Fix uninitialised variable in intel_context_create_request Maarten Lankhorst
2020-09-18 13:58 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-09-18 16:33 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-09-18 17:19 ` Rodrigo Vivi [this message]
2020-09-21 9:24 ` [Intel-gfx] [PATCH] " Maarten Lankhorst
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=20200918171940.GC716636@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.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